pypa-hatch/pyproject.toml

192 lines
4.1 KiB
TOML

[build-system]
requires = ["hatchling>=1.14.0"]
build-backend = "hatchling.build"
[project]
name = "hatch"
description = "Modern, extensible Python project management"
readme = "README.md"
license = "MIT"
requires-python = ">=3.7"
keywords = [
"build",
"dependency",
"environment",
"hatch",
"packaging",
"plugin",
"publishing",
"release",
"versioning",
]
authors = [
{ name = "Ofek Lev", email = "oss@ofek.dev" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Build Tools",
]
dependencies = [
"click>=8.0.3",
"hatchling>=1.14.0",
"httpx>=0.22.0",
"hyperlink>=21.0.0",
"keyring>=23.5.0",
"packaging>=21.3",
"pexpect~=4.8",
"platformdirs>=2.5.0",
"pyperclip>=1.8.2",
"rich>=11.2.0",
"shellingham>=1.4.0",
"tomli-w>=1.0",
"tomlkit>=0.11.1",
"userpath~=1.7",
"virtualenv>=20.16.2",
]
dynamic = ["version"]
[project.urls]
Homepage = "https://hatch.pypa.io/latest/"
Sponsor = "https://github.com/sponsors/ofek"
History = "https://hatch.pypa.io/dev/history/hatch/"
Tracker = "https://github.com/pypa/hatch/issues"
Source = "https://github.com/pypa/hatch"
[project.scripts]
hatch = "hatch.cli:main"
[tool.hatch.version]
path = "src/hatch/__about__.py"
[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/backend",
"/scripts",
]
[tool.black]
line-length = 120
skip-string-normalization = true
target-version = ["py37"]
[tool.ruff]
target-version = "py37"
line-length = 120
select = [
"A",
"B",
"C",
"DTZ",
"E",
"EM",
"F",
"FBT",
"I",
"ICN",
"ISC",
"N",
"PLC",
"PLE",
"PLR",
"PLW",
"Q",
"RUF",
"S",
"SIM",
"T",
"TID",
"UP",
"W",
"YTT",
]
ignore = [
# Allow non-abstract empty methods in abstract base classes
"B027",
# Allow boolean positional values in function calls, like `dict.get(... True)`
"FBT003",
# Ignore checks for possible passwords
"S105", "S106", "S107",
# Ignore complexity
"C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915",
"PLC1901", # empty string comparisons
"PLW2901", # `for` loop variable overwritten
"SIM114", # Combine `if` branches using logical `or` operator
]
unfixable = [
# Don't touch unused imports
"F401",
]
[tool.ruff.isort]
known-first-party = ["hatch", "hatchling"]
[tool.ruff.flake8-quotes]
inline-quotes = "single"
[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.per-file-ignores]
# Allow print/pprint
"backend/src/hatchling/bridge/app.py" = ["T201"]
"backend/tests/downstream/integrate.py" = ["T201"]
"scripts/*" = ["T201"]
# Tests can use magic values, assertions, and relative imports
"tests/**/*" = ["PLR2004", "S101", "TID252"]
[tool.mypy]
disallow_untyped_defs = false
disallow_incomplete_defs = false
follow_imports = "normal"
ignore_missing_imports = true
pretty = true
show_column_numbers = true
show_error_codes = true
warn_no_return = false
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = [
"*.hatchling.*",
"*.hatch.utils.*",
]
disallow_untyped_defs = true
disallow_incomplete_defs = true
warn_no_return = true
[tool.coverage.run]
branch = true
source_pkgs = ["hatch", "hatchling", "tests"]
omit = [
"backend/src/hatchling/__main__.py",
"backend/src/hatchling/bridge/*",
"backend/src/hatchling/ouroboros.py",
"src/hatch/__main__.py",
"src/hatch/cli/new/migrate.py",
"src/hatch/utils/shells.py",
]
[tool.coverage.paths]
hatch = ["src/hatch", "*/hatch/src/hatch"]
hatchling = ["backend/src/hatchling", "*/hatch/backend/src/hatchling"]
tests = ["tests", "*/hatch/tests"]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]