
# Written by `lab init`. `lab run` runs `ruff format --check`, `ruff check` and `ty check` with these
# settings and submits nothing while any of them fails; the git pre-commit hook runs the same checks.
[tool.labqoat.checks]
strict = true

[tool.ruff]
line-length = 120
target-version = "py312"

[tool.ruff.lint]
select = ["ALL"]
preview = true
explicit-preview-rules = true
extend-select = ["PLR1702", "PLR0917", "PLR6301", "PLC2701"]
ignore = [
  "D203",    # conflicts with D211
  "D213",    # conflicts with D212
  "COM812",  # the formatter owns trailing commas
  "ISC001",  # the formatter owns implicit string concatenation
  "INP001",  # app files sit at the project root, not in a package
  "ARG001",  # every Labqoat function takes RunContext first, used or not
  "FBT001",  # boolean parameters become --flag options of `lab run`
  "FBT002",
  "PLC0415", # heavy imports belong inside the function that runs on the worker
  "CPY001",
]

[tool.ruff.lint.per-file-ignores]
"tests/**" = ["S101", "PLR2004", "PLR6301"]

[tool.ruff.lint.mccabe]
max-complexity = 8

[tool.ruff.lint.pylint]
max-args = 8
max-positional-args = 4
max-branches = 8
max-returns = 4
max-statements = 30
max-nested-blocks = 3
max-bool-expr = 3

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.format]
docstring-code-format = true

[tool.ty.rules]
all = "error"

[tool.ty.terminal]
error-on-warning = true
