content: [project]
  name = "openkat"
  version = "0.0.1.dev1"
  description = "OpenKAT Coordination package"
  authors = [{ name = "MinVWS", email = "maintainer@openkat.nl" }]
  requires-python = ">=3.10"
  readme = "README.rst"
  license = "EUPL-1.2"
  dependencies = [
      "sphinx>=8.1.3,<9",
      "sphinx_rtd_theme>=3.0.2,<4",
      "sphinxcontrib-mermaid>=1.0.0,<2",
      "myst-parser>=4.0.1,<5",
      "settings-doc>=4.3.2,<5",
      "colorama==0.4.6",
      "autodoc-pydantic>=2.2.0,<3",
      "croniter>=6.0.0,<7",
      "jsonschema>=4.17.0,<5",
  ]
  
  [tool.uv]
  package = false
  
  [tool.mypy]
  python_version = "3.10"
  plugins = ["pydantic.mypy"]
  strict = true
  disallow_subclassing_any = false
  disallow_untyped_decorators = false # Needed for FastAPI decorators
  disallow_any_generics = false
  disallow_untyped_calls = false
  disallow_incomplete_defs = false
  disallow_untyped_defs = false
  no_implicit_reexport = false
  warn_return_any = false
  
  [[tool.mypy.overrides]]
  # Following pydantic imports currently gives 2000 errors
  module = ["pydantic.*"]
  follow_imports = "skip"
  
  [[tool.mypy.overrides]]
  module = ["bytes.*", "cveapi.*"]
  disallow_any_generics = true
  disallow_untyped_defs = true
  disallow_untyped_calls = true
  disallow_incomplete_defs = true
  no_implicit_reexport = true
  
  [tool.setuptools_scm]
  write_to = "_version.py"
  
  [tool.vulture]
  min_confidence = 90
  exclude = ["/tests/", "*venv*", "rocky/tools/migrations"]
  paths = ["."]
  
  [tool.ruff]
  fix = true
  
  # Exclude a variety of commonly ignored directories.
  extend-exclude = [
      "__pycache__"
  ]
  
  line-length = 120
  
  # Support Python 3.10 and higher
  target-version = "py310"
  
  [tool.ruff.format]
  skip-magic-trailing-comma = true
  
  [tool.ruff.lint]
  # Enable classic flake8, pyflakes, eradicate, and tidyimport
  # To be extended with DJ, PT, RUF, C90, D, PL, RET
  select = ["E", "F", "ERA", "W", "TID", "I", "G", "INP", "T20", "UP", "ISC", "PTH", "SIM", "PLC", "A", "S"]
  ignore = [
       "A003", # Built-in shadowing is usually not a problem and some built-ins have very generic names
       "SIM103", # Creating long return statements is often less readable
       "SIM108", # Ternary operator is not always more readable
       "S101", # Assert use is normal in pytest tests
       "S104", # Binding to all is normal in containers
       "S105", # Disabled because of false positives
       "S106", # Disabled because of false positives
       "S308", # Mark_safe usage is okay
       "S324", # Insecure hash functions can still be useful
       "S603", # Disabled because of false positives
       "S607", # Disabled because of false positives
  ]
  
  # Add "Example" to allowed code comments
  task-tags = ["Example", "todo", "TODO", "FIXME"]
  
  [tool.ruff.lint.per-file-ignores]
  "__init__.py" = ["F401","F403"]
  "whitelist.py" = ["F821", "INP"]
  "rocky/*/migrations/*.py" = ["E501"]
  "octopoes/bits/check_csp_header/check_csp_header.py" = ["ERA001"]
  "boefjes/boefjes/plugins/kat_binaryedge/http_web/normalize.py" = ["ERA001"]
  "*/packaging/*" = ["INP"]
  "*/.ci/*" = ["INP"]
  "conf.py" = ["INP", "PTH", "A"]
  "conftest.py" = ["INP"]
  "setup.py" = ["INP"]
  "manage.py" = ["INP"]
  "*/tests/*" = ["T20"]
  "boefjes/boefjes/plugins/*" = ["PTH", "S108"]
  "boefjes/images/*" = ["INP001"]
  "scripts/*.py" = ["INP001", "T201"]
  "cveapi/cveapi.py" = ["INP001"]
  
  [tool.ruff.lint.flake8-tidy-imports.banned-api]
  "rocky.settings".msg = "Use django.conf.settings"
  
  [tool.ruff.lint.isort]
  split-on-trailing-comma = false
  
  [tool.codespell]
  ignore-words-list = 'edn,juxt,assertIn'
  