diff --git a/pyproject.toml b/pyproject.toml index 4b52416..379840a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,10 +3,10 @@ ############################################################################### [tool.ruff] +target-version = "py311" src = [ "src", ] -target-version = "py311" select = [ "ALL", ] @@ -28,8 +28,8 @@ ignore = [ "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` ] -[tool.ruff.per-file-ignores] -"**/tests/*" = [ +pydocstyle.convention = "pep257" +per-file-ignores."**/tests/*" = [ "S101", # Use of assert detected. "S105", # Possible hardcoded password. "B011", # Do not call assert False since python -O removes these calls. @@ -38,25 +38,19 @@ ignore = [ "S311", # Standard pseudo-random generators are not suitable for cryptographic purposes. ] # File {name} is part of an implicit namespace package. Add an `__init__.py`. -"tasks.py" = [ +per-file-ignores."tasks.py" = [ "INP001", ] -"src/conftest.py" = [ +per-file-ignores."src/conftest.py" = [ "INP001", ] -"src/manage.py" = [ +per-file-ignores."src/manage.py" = [ "INP001", ] - -"src/purchase/management/commands/generate_dummy_baskets.py" = [ +per-file-ignores."src/purchase/management/commands/generate_dummy_baskets.py" = [ "S311", # Standard pseudo-random generators are not suitable for cryptographic purposes. ] - -[tool.ruff.pydocstyle] -convention = "pep257" - -[tool.ruff.mccabe] -max-complexity = 10 +mccabe.max-complexity = 10 [tool.pytest.ini_options] addopts = "--color=yes --driver Firefox"