Skip to content

Which code style are used in this project?

For code style we use PEP 87, but with black1.

For Naming conventions we attach to PEP8 Naming Conventions.

For functions/methods/classes/modules/etc. documentation (docstrings) we use Numpy Documentation Style Guide.

We type the code, so we're following PEP 4848 recommendations.

Tools to ensure you're code is compliant with our code style.

In this project we use black1 to format the code.

Black is a PEP 87 compliant opinionated formatter

To sort imports, we use isort3, which is a tool that manages the order of imports in a file.

To check if you typed the code, we use mypy2, which is a checker for PEP 4848.

For checking that you don't let some imports, variables, etc. unused, some bad programming practices, and a lot of things more, we use flake84.

And for checking that the docstrings are well formatted, we use flake8-pydocstyle5.

How to run the tools to check if everything is correct

You must run the next command: make lint.

It automatically runs all the tools, if it returns any errors, please fix it before making the commit.

If you want to apply black and isort to whole project (if you don't have this tools configured in your editor), you can run the command: make apply_black_isort.