Skip to content

Codestyle

dilyararimovna edited this page Jan 9, 2023 · 1 revision

What code style frameworks do we utilize?

We utilize two steps control to check code style of all files that differ from dev branch in every pull request to dev branch:

black code style

  1. Install dependencies for black framework.

  2. [Optional] Check black code style using the following command:

black --line-length=120 --check .

This command will list files to be reformatted.

  1. One may automatically reformat files that differ from dev branch using the following command:
black --line-length=120 .

After that one should add and commit all the reformatted files.

flake8 code style

  1. Check flake8 code style using the following command:
./bin/run_codestyle.sh

This command will list errors and corresponding files.