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

[project]
name = "papagai"
dynamic = ["version"]
description = "A CLI tool to run Claude on git worktrees with automated commits"
readme = "README.md"
requires-python = ">=3.10"
license = {text = "GPL-3.0-or-later"}
dependencies = [
    "click>=8.0",
]
authors = [
    {name = "Peter Hutterer", email = "peter.hutterer@who-t.net"}
]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Topic :: Software Development :: Version Control :: Git",
]

[project.scripts]
papagai = "papagai:papagai"

[project.urls]
Homepage = "https://github.com/whot/claude-instructions"
Repository = "https://github.com/whot/claude-instructions"

[tool.hatch.version]
path = "papagai/__init__.py"

[tool.hatch.build.targets.wheel]
packages = ["papagai"]
include = [
    "papagai/instructions/**/*.md",
    "papagai/primers/**/*.md",
    "papagai/py.typed",
]

[dependency-groups]
dev = [
    "pytest>=8.4.2",
    "mypy>=1.11.0",
    "ruff>=0.14.0",
]

[tool.ruff]
target-version = "py310"

[tool.ruff.lint]
select = [
    "E",      # pycodestyle errors
    "W",      # pycodestyle warnings
    "F",      # pyflakes
    "I",      # isort
    "N",      # pep8-naming
    "UP",     # pyupgrade
    "B",      # flake8-bugbear
    "C4",     # flake8-comprehensions
    "SIM",    # flake8-simplify
    "PIE",    # flake8-pie
    "PT",     # flake8-pytest-style
    "RET",    # flake8-return
    "ARG",    # flake8-unused-arguments
]
ignore = [
    "E501",   # line too long (handled by formatter)
]

[tool.ruff.lint.per-file-ignores]
"test/**/*.py" = [
    "ARG001",  # unused function arguments (fixtures)
    "ARG002",  # unused method arguments (fixtures)
    "PT006",   # pytest parametrize - allow strings instead of tuples
    "PT011",   # pytest-raises-too-broad
    "SIM117",  # nested with statements (test readability)
]

[tool.mypy]
python_version = "3.10"
strict = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true

[[tool.mypy.overrides]]
module = "click.*"
ignore_missing_imports = true
