[tool.mypy]
python_version = "3.13"
pretty = true
warn_redundant_casts = true
disallow_untyped_calls = true
disallow_untyped_defs = true
no_implicit_optional = true
exclude = "clan_cli.nixpkgs"



[tool.ruff]
target-version = "py313"
line-length = 88
lint.select = [ "ALL" ]
lint.ignore = [
  "ANN401",  # any-type
  "C901",    # complex-structure
  "COM812",  # missing-trailing-comma
  "D100",    # undocumented-public-module
  "D101",    # undocumented-public-class
  "D102",    # undocumented-public-method
  "D103",    # undocumented-public-function
  "D104",    # undocumented-public-package
  "D105",    # undocumented-magic-method
  "D107",    # undocumented-public-init
  "D200",    # unnecessary-multiline-docstring
  "D203",    # incorrect-blank-line-before-class
  "D213",    # multi-line-summary-second-line
  "D401",    # non-imperative-mood
  "D415",    # missing-terminal-punctuation
  "E402",    # module-import-not-at-top-of-file
  "E501",    # line-too-long
  "ERA001",  # commented-out-code
  "FBT001",  # boolean-type-hint-positional-argument
  "FBT002",  # boolean-default-value-positional-argument
  "FIX",     # flake8-fixme (FIXME comments)
  "G001",    # logging-string-format
  "G004",    # logging-f-string
  "PLR0911", # too-many-return-statements
  "PT023",   # pytest-incorrect-mark-parentheses-style
  "S603",    # subprocess-without-shell-equals-true
  "S607",    # start-process-with-partial-path
  "T201",    # print
  "TD",      # flake8-todos (TODO comments)
  "INP001",  # implicit-namespace-package

  # Maybe we can fix those
  "D205",    # missing-blank-line-after-summary
  "D400",    # missing-trailing-period
  "PLR0912", # too-many-branches
  "PLR0913", # too-many-arguments
  "PLR0915", # too-many-statements
  "FBT003",  # boolean-positional-value-in-call
]

[tool.ruff.lint.per-file-ignores]
# Test files (covers test_*.py, *_test.py, and files in tests/ directories)
"{test_*,*_test,**/tests/*}.py" = [
  "SLF001",  # private-member-access
  "S101",    # assert
  "S105",    # hardcoded-password-string
  "PLR2004"  # magic-value-comparison
]
"**/fixtures/*.py" = [
  "S101"     # assert
]
