-
-
Notifications
You must be signed in to change notification settings - Fork 321
Expand file tree
/
Copy pathpyproject.toml
More file actions
126 lines (110 loc) · 3.13 KB
/
pyproject.toml
File metadata and controls
126 lines (110 loc) · 3.13 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "tenacity/_version.py"
[project]
name = "tenacity"
dynamic = ["version"]
description = "Retry code until it succeeds"
readme = "README.rst"
license = "Apache-2.0"
requires-python = ">=3.10"
authors = [
{ name = "Julien Danjou", email = "[email protected]" },
]
classifiers = [
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Utilities",
]
[project.urls]
Homepage = "https://github.com/jd/tenacity"
Documentation = "https://tenacity.readthedocs.io"
Source = "https://github.com/jd/tenacity"
Issues = "https://github.com/jd/tenacity/issues"
Changelog = "https://tenacity.readthedocs.io/en/latest/changelog.html"
[project.optional-dependencies]
doc = [
"reno",
"sphinx",
]
test = [
"pytest",
"tornado>=6.0",
"typeguard",
]
[dependency-groups]
dev = [
"poethepoet",
"pytest",
"tornado>=6.0",
"typeguard",
"ruff",
"mypy",
"sphinx",
"reno",
"trio",
]
[tool.poe.tasks]
test = "pytest"
docs-doctest = "sphinx-build -a -E -W -b doctest doc/source doc/build"
docs-html = "sphinx-build -a -E -W -b html doc/source doc/build"
docs = ["docs-doctest", "docs-html"]
check = ["test", "docs"]
mypy = "mypy"
reno = "reno"
[tool.poe.tasks.fmt]
sequence = [
{ cmd = "ruff check --fix ." },
{ cmd = "ruff format ." },
]
[tool.poe.tasks.lint]
sequence = [
{ cmd = "ruff check ." },
{ cmd = "ruff format --check ." },
]
[tool.poe.tasks.all]
sequence = [
{ ref = "lint" },
{ ref = "mypy" },
{ ref = "check" },
]
[tool.pytest.ini_options]
filterwarnings = [
"once::DeprecationWarning",
]
[tool.ruff]
line-length = 88
indent-width = 4
target-version = "py310"
exclude = ["tenacity/_version.py"]
[tool.ruff.lint]
select = ["ASYNC", "B", "C4", "DTZ", "E", "EXE", "F", "FLY", "FURB", "I", "ICN", "ISC", "LOG", "PERF", "PGH", "PIE", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "SLOT", "T10", "TC", "UP", "W"]
ignore = [
"B008", # function calls in default arguments (intentional API design)
"B905", # zip() without strict= (not needed in existing code)
"E501", # line too long (formatter handles what it can)
"PYI036", # false positive on string-quoted __exit__ annotations
"RUF003", # ambiguous unicode characters in comments (copyright names)
"RUF005", # iterable unpacking vs concatenation (less readable for tuple +)
"RUF012", # mutable class default (test constant, never mutated)
"SIM108", # ternary instead of if-else (less readable in context)
]
[tool.mypy]
strict = true
files = ["tenacity", "tests"]
show_error_codes = true
exclude = ["tenacity/_version\\.py"]
[[tool.mypy.overrides]]
module = "tornado.*"
ignore_missing_imports = true