File size: 2,630 Bytes
065fee7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[build-system]
requires = ["flit_scm"]
build-backend = "flit_scm:buildapi"

[project]
name = "exceptiongroup"
description = "Backport of PEP 654 (exception groups)"
readme = "README.rst"
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python",
    "Programming Language :: Python :: 3 :: Only",
    "Typing :: Typed"
]
authors = [{name = "Alex Grönholm", email = "alex.gronholm@nextday.fi"}]
license = {file = "LICENSE"}
requires-python = ">=3.7"
dynamic = ["version"]

[project.urls]
Changelog = "https://github.com/agronholm/exceptiongroup/blob/main/CHANGES.rst"
"Source code" = "https://github.com/agronholm/exceptiongroup"
"Issue Tracker" = "https://github.com/agronholm/exceptiongroup/issues"

[project.optional-dependencies]
test = [
    "pytest >= 6"
]

[tool.flit.sdist]
include = [
    "CHANGES.rst",
    "tests",
]
exclude = [
    ".github/*",
    ".gitignore",
    ".pre-commit-config.yaml"
]

[tool.setuptools_scm]
version_scheme = "post-release"
local_scheme = "dirty-tag"
write_to = "src/exceptiongroup/_version.py"

[tool.ruff.lint]
extend-select = [
    "I",            # isort
    "ISC",          # flake8-implicit-str-concat
    "PGH",          # pygrep-hooks
    "RUF100",       # unused noqa (yesqa)
    "UP",           # pyupgrade
    "W",            # pycodestyle warnings
]

[tool.ruff.lint.pyupgrade]
# Preserve types, even if a file imports `from __future__ import annotations`.
keep-runtime-typing = true

[tool.ruff.lint.isort]
known-first-party = ["exceptiongroup"]

[tool.pytest.ini_options]
addopts = "-rsx --tb=short --strict-config --strict-markers"
testpaths = ["tests"]

[tool.coverage.run]
source = ["exceptiongroup"]
relative_files = true

[tool.coverage.report]
exclude_also = [
    "if TYPE_CHECKING:",
    "@overload",
]

[tool.pyright]
# for type tests, the code itself isn't type checked in CI
reportUnnecessaryTypeIgnoreComment = true

[tool.mypy]
# for type tests, the code itself isn't type checked in CI
warn_unused_ignores = true

[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py37, py38, py39, py310, py311, py312, py313, pypy3
labels =
    typing = py{310,311,312}-typing
skip_missing_interpreters = true
minversion = 4.0

[testenv]
extras = test
commands = python -m pytest {posargs}
package = editable
usedevelop = true

[testenv:{py37-,py38-,py39-,py310-,py311-,py312-,}typing]
deps =
    pyright
    mypy
commands =
    pyright --verifytypes exceptiongroup
    pyright tests/check_types.py
    mypy tests/check_types.py
usedevelop = true
"""