********** Code Style ********** Linting and formatting ====================== We orientate our code style on the `Google Python Style Guide `_ and `PEP 8 `_. To enforce this rules we use pre-commit. To run them locally use: .. code-block:: bash pre-commit run -a See `pre-commit `_ for more information. This will lint your code with `flake8 `_ and automatically try to fix some issues with `black `_. We also configured a few more packages to run with pre-commit: - `isort `_ to sort imports - `mypy `_ for type hints checking - `bandit `_ for security checking See the .pre-commit-config.yaml file for more. Type hints ========== As Python itself is a dynamically typed language, we use their `typing `_ support to add type hints to our code. This helps to understand the code and to find bugs. To enforce type hints we use `mypy `_. Its configured to be strict and to fail on any type hint error. If you run pre-commit you will also run mypy. Security ======== We use `bandit `_ to find common security issues in our code. If you run pre-commit you will also run bandit.