[build-system]
requires = ["hatchling>=1.25"]
build-backend = "hatchling.build"

[project]
name = "uniqfunc"
version = "0.1.0"
description = "Git-aware checker for globally unique Python function names + reuse suggestions for AI agents"
readme = "README.md"
requires-python = ">=3.12"
license = { text = "MIT" }
authors = [{ name = "Alex Dong", email = "me@alexdong.com" }]
dependencies = []

[project.optional-dependencies]
dev = ["pytest>=8.0"]

[project.scripts]
uniqfunc = "uniqfunc.cli:main"

[dependency-groups]
dev = [
  "pytest>=8.0",
  "ruff>=0.11.6",
  "ty>=0.0.1a14",
]

[tool.hatch.build.targets.wheel]
packages = ["src/uniqfunc"]

[tool.pytest.ini_options]
addopts = "-q"
testpaths = ["tests"]

[tool.ruff]
exclude = [".venv", "**/*_test.py"]

[tool.ruff.lint]
extend-select = [
  "A",      # flake8-builtins - prevent shadowing of built-in names
  "ANN",    # flake8-annotations - enforce type annotations
  "ARG",    # flake8-unused-arguments - detect unused function arguments
  "B",      # flake8-bugbear - find likely bugs and design problems
  "COM",    # flake8-commas - enforce trailing commas
  "C4",     # flake8-comprehensions - improve list/dict/set comprehensions
  "C90",    # mccabe - cyclomatic complexity checks
  "DTZ",    # flake8-datetimez - prevent naive datetime usage
  "E",      # pycodestyle errors - PEP 8 error violations
  "EM",     # flake8-errmsg - enforce error message best practices
  "F",      # pyflakes - detect various Python errors
  "FBT",    # flake8-boolean-trap - prevent boolean trap anti-patterns
  "FURB",   # refurb - modernize Python code
  "I",      # isort - import sorting and organization
  "ISC",    # flake8-implicit-str-concat - prevent implicit string concatenation
  "LOG",    # flake8-logging - logging best practices
  "G",      # flake8-logging-format - logging format string issues
  "N",      # pep8-naming - enforce PEP 8 naming conventions
  "NPY",    # numpy-specific rules - NumPy best practices
  "PD",     # pandas-vet - pandas best practices
  "PERF",   # perflint - performance anti-patterns
  "PIE",    # flake8-pie - miscellaneous improvements
  "PL",     # pylint - comprehensive Python linting
  "PT",     # flake8-pytest-style - pytest best practices
  "PTH",    # flake8-use-pathlib - prefer pathlib over os.path
  "Q",      # flake8-quotes - enforce quote style consistency
  "RET",    # flake8-return - improve return statement usage
  "RUF",    # ruff-specific rules - ruff's own additional checks
  "SIM",    # flake8-simplify - simplify code constructs
  "SLF",    # flake8-self - private member access checks
  "SLOT",   # flake8-slots - enforce __slots__ usage
  "TID",    # flake8-tidy-imports - tidy import organization
  "TC",     # flake8-type-checking - optimize type checking imports
  "UP",     # pyupgrade - upgrade syntax for newer Python versions
  "W",      # pycodestyle warnings - PEP 8 warning violations
]
extend-ignore = [
  "COM812",   # flake8-commas - allow trailing commas in function calls
  "EM102",    # flake8-errmsg - allow exception message in f-string
  "E501",     # pycodestyle - ignore line too long (let formatter handle it)
  "PLR0913",  # pylint - allow more than 5 function arguments
  "TRY003",   # tryceratops - allow long exception messages
  "W293",     # pycodestyle - allow blank line with whitespace
]

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