| 1 |
[build-system] |
| 2 |
requires = ["flit_scm"] |
| 3 |
build-backend = "flit_scm:buildapi" |
| 4 |
|
| 5 |
[project] |
| 6 |
name = "exceptiongroup" |
| 7 |
description = "Backport of PEP 654 (exception groups)" |
| 8 |
readme = "README.rst" |
| 9 |
classifiers = [ |
| 10 |
"Development Status :: 5 - Production/Stable", |
| 11 |
"Intended Audience :: Developers", |
| 12 |
"License :: OSI Approved :: MIT License", |
| 13 |
"Programming Language :: Python", |
| 14 |
"Programming Language :: Python :: 3 :: Only", |
| 15 |
"Typing :: Typed" |
| 16 |
] |
| 17 |
authors = [{name = "Alex Grönholm", email = "[email protected]"}] |
| 18 |
license = {file = "LICENSE"} |
| 19 |
requires-python = ">=3.7" |
| 20 |
dynamic = ["version"] |
| 21 |
|
| 22 |
[project.urls] |
| 23 |
Changelog = "https://github.com/agronholm/exceptiongroup/blob/main/CHANGES.rst" |
| 24 |
"Source code" = "https://github.com/agronholm/exceptiongroup" |
| 25 |
"Issue Tracker" = "https://github.com/agronholm/exceptiongroup/issues" |
| 26 |
|
| 27 |
[project.optional-dependencies] |
| 28 |
test = [ |
| 29 |
"pytest >= 6" |
| 30 |
] |
| 31 |
|
| 32 |
[tool.flit.sdist] |
| 33 |
include = [ |
| 34 |
"CHANGES.rst", |
| 35 |
"tests", |
| 36 |
] |
| 37 |
exclude = [ |
| 38 |
".github/*", |
| 39 |
".gitignore", |
| 40 |
".pre-commit-config.yaml" |
| 41 |
] |
| 42 |
|
| 43 |
[tool.setuptools_scm] |
| 44 |
version_scheme = "post-release" |
| 45 |
local_scheme = "dirty-tag" |
| 46 |
write_to = "src/exceptiongroup/_version.py" |
| 47 |
|
| 48 |
[tool.ruff.lint] |
| 49 |
select = [ |
| 50 |
"E", "F", "W", # default flake-8 |
| 51 |
"I", # isort |
| 52 |
"ISC", # flake8-implicit-str-concat |
| 53 |
"PGH", # pygrep-hooks |
| 54 |
"RUF100", # unused noqa (yesqa) |
| 55 |
"UP", # pyupgrade |
| 56 |
] |
| 57 |
|
| 58 |
[tool.ruff.lint.pyupgrade] |
| 59 |
# Preserve types, even if a file imports `from __future__ import annotations`. |
| 60 |
keep-runtime-typing = true |
| 61 |
|
| 62 |
[tool.ruff.lint.isort] |
| 63 |
known-first-party = ["exceptiongroup"] |
| 64 |
|
| 65 |
[tool.pytest.ini_options] |
| 66 |
addopts = "-rsx --tb=short --strict-config --strict-markers" |
| 67 |
testpaths = ["tests"] |
| 68 |
|
| 69 |
[tool.coverage.run] |
| 70 |
source = ["exceptiongroup"] |
| 71 |
relative_files = true |
| 72 |
|
| 73 |
[tool.coverage.report] |
| 74 |
exclude_also = [ |
| 75 |
"if TYPE_CHECKING:", |
| 76 |
"@overload", |
| 77 |
] |
| 78 |
|
| 79 |
[tool.pyright] |
| 80 |
# for type tests, the code itself isn't type checked in CI |
| 81 |
reportUnnecessaryTypeIgnoreComment = true |
| 82 |
|
| 83 |
[tool.mypy] |
| 84 |
# for type tests, the code itself isn't type checked in CI |
| 85 |
warn_unused_ignores = true |
| 86 |
|
| 87 |
[tool.tox] |
| 88 |
legacy_tox_ini = """ |
| 89 |
[tox] |
| 90 |
envlist = py37, py38, py39, py310, py311, py312, pypy3 |
| 91 |
labels = |
| 92 |
typing = py{310,311,312}-typing |
| 93 |
skip_missing_interpreters = true |
| 94 |
minversion = 4.0 |
| 95 |
|
| 96 |
[testenv] |
| 97 |
extras = test |
| 98 |
commands = python -m pytest {posargs} |
| 99 |
package = editable |
| 100 |
usedevelop = true |
| 101 |
|
| 102 |
[testenv:{py37-,py38-,py39-,py310-,py311-,py312-,}typing] |
| 103 |
deps = |
| 104 |
pyright |
| 105 |
mypy |
| 106 |
commands = |
| 107 |
pyright --verifytypes exceptiongroup |
| 108 |
pyright tests/check_types.py |
| 109 |
mypy tests/check_types.py |
| 110 |
usedevelop = true |
| 111 |
""" |