Linting and Formatting¶
Overview¶
When you installed the [dev] dependencies, you installed several code-formatting and linting tools, including:
black: A very useful and opinionated code formatter, which you can use by runningblack .in the base directory.isort: A utility that will sort your import statements for you, which you can use by runningisort .in the base directory.ruff: A versatile Python linter to clean up your code, which you can use by runningruff . --fixin the base directory.docformatter: A simple docstring formatter, which you can use by runningdocformatter . -r -iin the base directory.
Modifications to the rules these formatters use can be defined in the pyproject.toml file, and we have chosen some useful defaults.