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

[tool.isort]
profile = "black"
line_length = 120

[tool.ruff]
target-version = "py311"
line-length = 120
exclude = [
  ".git",
  "__pycache__",
  ".venv",
  "venv",
  "node_modules",
  "alembic",
  ".gitea",
  ".next",
  "dist",
  "build",
  "hostexecutor",
]

[tool.ruff.lint]
select = [
  "E",   # pycodestyle errors（同 flake8 默认）
  "F",   # pyflakes（同 flake8 默认）
]
ignore = [
  "E203",
  "E501",  # line-too-long（black管）
  "E302",
  "E402",  # module-import-not-at-top（循环导入多）
  "E722",  # bare-except
  "W291",
  "W293",
  "F401",
  "F403",
  "F405",
  "F841",
]

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F403", "F405"]
"tests/**" = ["E402", "F401", "F821", "F841"]
"packages/ports/*" = ["E301"]
"apps/api/app/api/routes/auth.py" = ["ALL"]
