[project]
name = "scripts"
version = "0.1.0"
description = "PR stale review scripts for GitHub Actions"
requires-python = ">=3.14"
dependencies = [
    "requests>=2.32.5",
]

[dependency-groups]
dev = [
    "ruff>=0.9.0",
    "pre-commit>=4.0.0",
    "pytest>=9.0.3",
    "ty>=0.0.1a1",
    "vulture>=2.14",
    "pip-audit>=2.7.0",
]

[tool.pytest.ini_options]
pythonpath = ["."]

[tool.ruff]
line-length = 100

[tool.ruff.lint]
# E/F  pycodestyle + pyflakes (baseline)
# I    import sorting
# UP   pyupgrade (modern syntax for the pinned Python)
# B    bugbear (mutable defaults, broad/misused except, etc.)
# SIM  flake8-simplify (collapsible/redundant constructs)
# C4   flake8-comprehensions
# PIE  flake8-pie (misc anti-patterns)
# RET  flake8-return (return-flow smells)
# RUF  ruff-specific (ambiguous unicode, unused noqa, ...)
# S    flake8-bandit (security: hardcoded secrets, requests w/o timeout, ...)
# DTZ  flake8-datetimez (naive datetime usage)
# BLE  flake8-blind-except (bare/blind except)
select = ["E", "F", "I", "UP", "B", "SIM", "C4", "PIE", "RET", "RUF", "S", "DTZ", "BLE"]

[tool.ruff.lint.per-file-ignores]
# Tests legitimately use assert (S101) and mock/patch patterns.
"tests/**" = ["S101"]

[tool.ruff.lint.isort]
known-first-party = ["stale_pr_review"]

[tool.ty.rules]
# core.py reads Any-typed GitHub JSON and guards _members_cache before use;
# the checker can't always narrow those, so silence the known false positives
# while still catching real type errors elsewhere.
possibly-missing-attribute = "ignore"

[tool.vulture]
min_confidence = 70
