Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 1.17 KB

formatting-and-linting.md

File metadata and controls

24 lines (14 loc) · 1.17 KB

Formatting and Linting

Formatting

Run make format to run all of the formatters.

When we run migrations via alembic, we autorun the formatters on the generated files. See alembic.ini for configuration.

Isort

isort is used to sort our Python imports. Configuration options can be found in pyproject.toml - tool.isort

Black

black is used to format our Python code. Configuration options can be found in pyproject.toml - tool.black

Linting

Run make lint to run all of the linters. It's recommended you run the formatters first as they fix several linting issues automatically.

Flake

ruff is used to enforce a set of best practices for our Python code. Configuration options can be found in pyproject.toml - tool.ruff.

Mypy

mypy is used to validate and enforce typechecking in python. Configuration options can be found in pyproject.toml - tool.mypy