[tool.ruff] | |
target-version = 'py38' | |
exclude = [ | |
"migrations", | |
"__pycache__", | |
"manage.py", | |
"settings.py", | |
"env", | |
".env", | |
"venv", | |
".venv", | |
"my_venv", | |
".vscode", | |
] | |
line-length = 120 | |
[tool.ruff.format] | |
docstring-code-format = true | |
[tool.ruff.lint] | |
select = [ | |
"B", # flake8-bugbear | |
"C4", # flake8-comprehensions | |
"D", # pydocstyle | |
"E", # Error | |
"F", # pyflakes | |
"I", # isort | |
"N", # pep8-naming | |
"PGH", # pygrep-hooks | |
"PTH", # flake8-use-pathlib | |
"Q", # flake8-quotes | |
"S", # bandit | |
"SIM", # flake8-simplify | |
"TRY", # tryceratops | |
"UP", # pyupgrade | |
"W", # Warning | |
"YTT", # flake8-2020 | |
] | |
ignore = [ | |
"B905", # zip strict=True; remove once python <3.10 support is dropped. | |
"D100", | |
"D101", | |
"D102", | |
"D103", | |
"D104", | |
"D105", | |
"D106", | |
"D107", | |
"D200", | |
"D205", # Ignore extra line betwwen summary line and description in function comments | |
"D401", | |
"E402", | |
"E501", | |
"F401", | |
"N805", | |
"B904", | |
"D400", | |
"TRY003", | |
"S101", | |
"N815", # Ignore mixedCase naming for function and variable names in class scope, | |
"S608", # | |
"B008", | |
"TRY301", # Ignore, can direct raise an exception., | |
"TRY300", | |
"PTH118", | |
"PTH123", | |
"PTH103", | |
"TRY201", | |
"F405", | |
"F403", | |
"N803", | |
"S105", | |
"N802" | |
] | |
[tool.ruff.lint.flake8-bugbear] | |
extend-immutable-calls = [ | |
"chr", | |
"typer.Argument", | |
"typer.Option", | |
] | |
[tool.ruff.lint.pydocstyle] | |
convention = "numpy" | |
[tool.ruff.lint.per-file-ignores] | |
"tests/*.py" = [ | |
"D100", | |
"D101", | |
"D102", | |
"D103", | |
"D104", | |
"D105", | |
"D106", | |
"D107", | |
"S101", # use of "assert" | |
"S102", # use of "exec" | |
"S106", # possible hardcoded password. | |
"PGH001", # use of "eval" | |
"N815", | |
"PTH118", | |
"PTH123", | |
"PTH103", | |
"TRY201", | |
"F405", | |
"F403", | |
"N803" | |
] | |
[tool.ruff.lint.pep8-naming] | |
staticmethod-decorators = [ | |
"pydantic.validator", | |
"pydantic.root_validator", | |
] | |
[tool.black] | |
line-length = 120 | |
include = '\.pyi?$' | |
exclude = ''' | |
/( | |
\.git | |
| \.hg | |
| \.mypy_cache | |
| \.tox | |
| \.venv | |
| _build | |
| buck-out | |
| build | |
| dist | |
| migrations # Exclude migrations | |
| __pycache__ # Exclude __pycache__ | |
| manage\.py # Exclude manage.py | |
| settings\.py # Exclude settings.py | |
| env # Exclude env | |
| \.env # Exclude .env | |
| venv # Exclude venv | |
| \.venv # Exclude .venv | |
| my_venv # Exclude my_venv | |
| \.vscode # Exclude .vscode | |
| /alembic/ # Exclude alembic folder | |
)/ | |
''' | |