Skip to content
Snippets Groups Projects
pyproject.toml 1.29 KiB
[tool.mypy]
mypy_path = "sage_validation"
exclude = [
    "venv",
    "docs",
    "manage.py",


]
ignore_missing_imports = true  # Ignore imports that are not typed
disallow_untyped_calls = true    # Disallow calls to untyped functions
disallow_untyped_defs = true      # Disallow untyped function definitions

[tool.ruff]
extend-exclude = [
    "*/migrations",
    "sage_validation/wsgi.py",
    "sage_validation/asgi.py",
    "sage_validation/settings.py",
    "manage.py",
    "docs",
    "theme",
]
select = [
    "A", "ARG", "B", "BLE", "C", "COM", "C4", "C90", "D", "DTZ",
    "E", "EM", "ERA", "F", "FA", "FBT", "FLY", "FURB", "G", "I",
    "ICN", "INP", "ISC", "LOG", "N", "PERF", "PGH", "PIE", "PL",
    "PT", "PTH", "PYI", "Q", "RET", "R", "RET", "RSE", "RUF",
    "S", "SIM", "SLF", "T", "T20", "TID", "TRY", "UP", "W", "YTT"
]
ignore = [
    "COM812", "D203", "D213", "ISC001", "N805", "PLR0913", "PLR0904", "PLW1514", "D104"
]
target-version = "py312"
line-length = 120

[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"

[tool.ruff.lint.per-file-ignores]
"test/*" = ["ARG001", "D", "S101", "PLR2004", "PLR0917", "PLR0914", "PLC0415", "PLC2701"]

[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "test.settings"
django_find_project = false
python_files = ["tests.py", "test_*.py", "*_tests.py"]