Skip to content

Latest commit

 

History

History
81 lines (46 loc) · 1 KB

File metadata and controls

81 lines (46 loc) · 1 KB

Linters + formatters

We follow mostly pep8.

Line width is 88 (standard black).

For exceptions see .flake8

Run lint

Run linting:

make lint

Check linting:

bash scripts/lint-check.sh

Setup pre-commit

poetry run pre-commit install

Black

Formats code

poetry run black .

Isort

Sorts imports

poetry run isort .

Autoflake

Removes unused imports and unused variables.

poetry run autoflake --in-place --recursive --ignore-init-module-imports --expand-star-imports --remove-unused-variables .

Flake8

Used for enforcing style guide. This will not format anything.

poetry run flake8 .

Mypy

Static type checking. Doesn't format anything.

poetry run mypy .

Run all

poetry run black . && poetry run isort . && poetry run autoflake -i -r --ignore-init-module-imports --expand-star-imports --remove-unused-variables . && poetry run flake8 . && poetry run mypy .