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

[project]
name = "incant"
authors = [{name = "Tin Tvrtkovic", email = "tinchester@gmail.com"}]
classifiers = [
    "License :: OSI Approved :: Apache Software License",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: Implementation :: CPython",
    "Programming Language :: Python :: Implementation :: PyPy",
    "Typing :: Typed",
]
version = "23.2.0"
requires-python = ">=3.8"
description = "Magical function composition"
readme = "README.md"
dependencies = ["attrs"]
license = {file = "LICENSE"}

[project.urls]
Home = "https://github.com/Tinche/incant"

[tool.pdm.dev-dependencies]
test = [
    "cattrs>=22.2.0",
    "coverage>=7.0.1",
    "httpx>=0.23.1",
    "pytest-asyncio>=0.20.3",
    "pytest>=7.2.0",
    "quart>=0.18.3",
    "quattro>=0.3",  # For 3.8
    "rich>=12.6.0",
    "structlog>=22.3.0",
    "uvicorn>=0.20.0",
]
lint = [
    "black>=23.3.0",
    "isort>=5.11.4",
    "ruff>=0.0.272",
    "mypy>=0.991",
]
docs = [
    "sphinx",
    "furo",
    "myst_parser",
    "sphinx_inline_tabs",
    "pyyaml>=6.0.1",
    "sphinx-copybutton>=0.5.2",
]

[tool.isort]
profile = "attrs"

[tool.pytest.ini_options]
asyncio_mode = "auto"

[tool.mypy]
warn_unused_ignores = true
warn_redundant_casts = true

[tool.coverage.run]
parallel = true
source_pkgs = ["incant"]

[tool.ruff]
src = ["src", "tests"]
select = [
    "E",   # pycodestyle
    "W",   # pycodestyle
    "F",   # Pyflakes
    "UP",  # pyupgrade
    "N",   # pep8-naming
    "YTT", # flake8-2020
    "S",   # flake8-bandit
    "B",   # flake8-bugbear
    "C4",  # flake8-comprehensions
    "T10", # flake8-debugger
    "ISC", # flake8-implicit-str-concat
    "RET", # flake8-return
    "SIM", # flake8-simplify
    "DTZ", # flake8-datetimez
    "PGH", # pygrep-hooks
    "PLC", # Pylint
    "PIE", # flake8-pie
    "RUF", # ruff
    "ARG", # flake8-unused-arguments
]
ignore = [
    "E501",   # line length is handled by black
    "S101",   # assert
    "S307",   # Eval
    "PGH001", # No eval lol?
    "PGH003", # leave my type: ignores alone
    "B008",   # can't get it to work with extend-immutable-calls
]
