Debian Codegraph @

pyproject.toml

raw
1 [project]
2 name = "click"
3 version = "8.3.3"
4 description = "Composable command line interface toolkit"
5 readme = "README.md"
6 license = "BSD-3-Clause"
7 license-files = ["LICENSE.txt"]
8 maintainers = [{name = "Pallets", email = "[email protected]"}]
9 classifiers = [
10 "Development Status :: 5 - Production/Stable",
11 "Intended Audience :: Developers",
12 "Operating System :: OS Independent",
13 "Programming Language :: Python",
14 "Typing :: Typed",
15 ]
16 requires-python = ">=3.10"
17 dependencies = [
18 "colorama; platform_system == 'Windows'",
19 ]
20
21 [project.urls]
22 Donate = "https://palletsprojects.com/donate"
23 Documentation = "https://click.palletsprojects.com/"
24 Changes = "https://click.palletsprojects.com/page/changes/"
25 Source = "https://github.com/pallets/click/"
26 Chat = "https://discord.gg/pallets"
27
28 [dependency-groups]
29 dev = [
30 "ruff",
31 "tox",
32 "tox-uv",
33 ]
34 docs = [
35 "myst-parser",
36 "pallets-sphinx-themes",
37 "sphinx",
38 "sphinx-tabs",
39 "sphinxcontrib-log-cabinet",
40 ]
41 docs-auto = [
42 "sphinx-autobuild",
43 ]
44 gha-update = [
45 "gha-update ; python_full_version >= '3.12'",
46 ]
47 pre-commit = [
48 "pre-commit",
49 "pre-commit-uv",
50 ]
51 tests = [
52 "pytest",
53 ]
54 tests-random = [
55 "pytest",
56 "pytest-randomly",
57 "pytest-xdist",
58 ]
59 typing = [
60 "mypy",
61 "pyright",
62 "pytest",
63 ]
64
65 [build-system]
66 requires = ["flit_core>=3.11,<4"]
67 build-backend = "flit_core.buildapi"
68
69 [tool.flit.module]
70 name = "click"
71
72 [tool.flit.sdist]
73 include = [
74 "docs/",
75 "tests/",
76 "CHANGES.rst",
77 "uv.lock"
78 ]
79 exclude = [
80 "docs/_build/",
81 ]
82
83 [tool.uv]
84 default-groups = ["dev", "pre-commit", "tests", "typing"]
85
86 [tool.pytest.ini_options]
87 testpaths = ["tests"]
88 filterwarnings = [
89 "error",
90 ]
91 markers = [
92 "stress: high-iteration stress tests for race conditions (deselect with '-m \"not stress\"')",
93 ]
94 addopts = "-m 'not stress'"
95
96 [tool.coverage.run]
97 branch = true
98 source = ["click", "tests"]
99
100 [tool.coverage.paths]
101 source = ["src", "*/site-packages"]
102
103 [tool.coverage.report]
104 exclude_also = [
105 "if t.TYPE_CHECKING",
106 "raise NotImplementedError",
107 ": \\.{3}",
108 ]
109
110 [tool.mypy]
111 python_version = "3.10"
112 files = ["src", "tests/typing"]
113 show_error_codes = true
114 pretty = true
115 strict = true
116
117 [[tool.mypy.overrides]]
118 module = [
119 "colorama.*",
120 ]
121 ignore_missing_imports = true
122
123 [tool.pyright]
124 pythonVersion = "3.10"
125 include = ["src", "tests/typing"]
126 typeCheckingMode = "basic"
127
128 [tool.ruff]
129 extend-exclude = ["examples/"]
130 src = ["src"]
131 fix = true
132 show-fixes = true
133 output-format = "full"
134
135 [tool.ruff.lint]
136 select = [
137 "B", # flake8-bugbear
138 "E", # pycodestyle error
139 "F", # pyflakes
140 "I", # isort
141 "UP", # pyupgrade
142 "W", # pycodestyle warning
143 ]
144
145 [tool.ruff.lint.isort]
146 force-single-line = true
147 order-by-type = false
148
149 [tool.tox]
150 env_list = [
151 "py3.14", "py3.13", "py3.12", "py3.11", "py3.10",
152 "py3.14t",
153 "pypy3.11",
154 "stress-py3.14", "stress-py3.14t",
155 "style",
156 "typing",
157 "docs",
158 ]
159
160 [tool.tox.env_run_base]
161 description = "pytest on latest dependency versions"
162 runner = "uv-venv-lock-runner"
163 package = "wheel"
164 wheel_build_env = ".pkg"
165 constrain_package_deps = true
166 use_frozen_constraints = true
167 dependency_groups = ["tests"]
168 commands = [[
169 "pytest", "-v", "--tb=short", "--basetemp={env_tmp_dir}",
170 {replace = "posargs", default = [], extend = true},
171 ]]
172
173 [tool.tox.env.random]
174 description = "randomized parallel tests to detect test pollution and race conditions"
175 dependency_groups = ["tests-random"]
176 commands = [[
177 "pytest", "-v", "--tb=short", "--numprocesses=auto",
178 "--basetemp={env_tmp_dir}",
179 {replace = "posargs", default = [], extend = true},
180 ]]
181
182 [tool.tox.env.stress]
183 description = "stress tests for stream lifecycle race conditions"
184 commands = [[
185 "pytest", "-v", "--tb=short", "-x", "-m", "stress",
186 "--basetemp={env_tmp_dir}",
187 "--override-ini=addopts=",
188 "tests/test_stream_lifecycle.py",
189 {replace = "posargs", default = [], extend = true},
190 ]]
191
192 [tool.tox.env.style]
193 description = "run all pre-commit hooks on all files"
194 dependency_groups = ["pre-commit"]
195 skip_install = true
196 commands = [["pre-commit", "run", "--all-files"]]
197
198 [tool.tox.env.typing]
199 description = "run static type checkers"
200 dependency_groups = ["typing"]
201 commands = [
202 ["mypy"],
203 ["pyright", "--ignoreexternal", "--verifytypes", "click"],
204 ]
205
206 [tool.tox.env.docs]
207 description = "build docs"
208 dependency_groups = ["docs"]
209 commands = [["sphinx-build", "-E", "-W", "-b", "dirhtml", "docs", "docs/_build/dirhtml"]]
210
211 [tool.tox.env.docs-auto]
212 description = "continuously rebuild docs and start a local server"
213 dependency_groups = ["docs", "docs-auto"]
214 commands = [["sphinx-autobuild", "-W", "-b", "dirhtml", "--watch", "src", "docs", "docs/_build/dirhtml"]]
215
216 [tool.tox.env.update-actions]
217 description = "update GitHub Actions pins"
218 labels = ["update"]
219 dependency_groups = ["gha-update"]
220 skip_install = true
221 commands = [["gha-update"]]
222
223 [tool.tox.env.update-pre_commit]
224 description = "update pre-commit pins"
225 labels = ["update"]
226 dependency_groups = ["pre-commit"]
227 skip_install = true
228 commands = [["pre-commit", "autoupdate", "--freeze", "-j4"]]
229
230 [tool.tox.env.update-requirements]
231 description = "update uv lock"
232 labels = ["update"]
233 dependency_groups = []
234 no_default_groups = true
235 skip_install = true
236 commands = [["uv", "lock", {replace = "posargs", default = ["-U"], extend = true}]]