Code Quality
============
At Django Easystart, we're committed to helping you write code that's not only functional but also easy to read, maintain, and build upon. 
Django easystart is already configured for this. You can lint and style your project using three powerful tools: flake8, black, and isort.

Flake8
------
Flake8 is a powerful tool that helps you identify and fix coding errors and inconsistencies. To ckeck for any errors just run:

.. code-block:: bash
    
    docker compose run --rm applocal flake8 .


Black
-----
Black automatically formats your code to ensure that it's consistent, readable, and maintainable. To check, view proposed changes and to apply them, run the following commands:

.. code-block:: bash

    docker compose run --rm applocal black . --check
    docker compose run --rm applocal black . --diff
    docker compose run --rm applocal black .


isort
-----
isort helps you sort your Python imports in a clean and organized way. To check, view proposed changes and to apply them, run the following commands:

.. code-block:: bash

    docker compose run --rm applocal isort . --check-only
    docker compose run --rm applocal isort . --diff
    docker compose run --rm applocal isort .


Together, these tools make for a powerful combination that helps you write code that's both high-quality and easy to work with. Before committing code to the repository, check for errors using the commands below and fix them if any:

.. code-block:: bash

    docker compose run --rm applocal flake8 .
    docker compose run --rm applocal black . --diff
    docker compose run --rm applocal isort . --check-only