forked from sphinx-doc/sphinx
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
318 lines (303 loc) · 9.4 KB
/
pyproject.toml
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
[build-system]
requires = ["flit_core>=3.7"]
build-backend = "flit_core.buildapi"
# project metadata
[project]
name = "Sphinx"
description = "Python documentation generator"
readme = "README.rst"
urls.Changelog = "https://www.sphinx-doc.org/en/master/changes.html"
urls.Code = "https://github.com/sphinx-doc/sphinx"
urls.Download = "https://pypi.org/project/Sphinx/"
urls.Homepage = "https://www.sphinx-doc.org/"
urls."Issue tracker" = "https://github.com/sphinx-doc/sphinx/issues"
license.text = "BSD-2-Clause"
requires-python = ">=3.10"
# Classifiers list: https://pypi.org/classifiers/
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"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 :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Framework :: Sphinx",
"Framework :: Sphinx :: Domain",
"Framework :: Sphinx :: Extension",
"Framework :: Sphinx :: Theme",
"Topic :: Documentation",
"Topic :: Documentation :: Sphinx",
"Topic :: Internet :: WWW/HTTP :: Site Management",
"Topic :: Printing",
"Topic :: Software Development",
"Topic :: Software Development :: Documentation",
"Topic :: Text Processing",
"Topic :: Text Processing :: General",
"Topic :: Text Processing :: Indexing",
"Topic :: Text Processing :: Markup",
"Topic :: Text Processing :: Markup :: HTML",
"Topic :: Text Processing :: Markup :: LaTeX",
"Topic :: Utilities",
]
dependencies = [
"sphinxcontrib-applehelp>=1.0.7",
"sphinxcontrib-devhelp>=1.0.6",
"sphinxcontrib-htmlhelp>=2.0.6",
"sphinxcontrib-jsmath>=1.0.1",
"sphinxcontrib-qthelp>=1.0.6",
"sphinxcontrib-serializinghtml>=1.1.9",
"Jinja2>=3.1",
"Pygments>=2.17",
"docutils>=0.20,<0.22",
"snowballstemmer>=2.2",
"babel>=2.13",
"alabaster>=0.7.14",
"imagesize>=1.3",
"requests>=2.30.0",
"packaging>=23.0",
"tomli>=2; python_version < '3.11'",
"colorama>=0.4.6; sys_platform == 'win32'",
]
dynamic = ["version"]
[project.optional-dependencies]
docs = [
"sphinxcontrib-websupport",
]
lint = [
"flake8>=6.0",
"ruff==0.6.1",
"mypy==1.11.1",
"sphinx-lint>=0.9",
"types-colorama==0.4.15.20240311",
"types-defusedxml==0.7.0.20240218",
"types-docutils==0.21.0.20240724",
"types-Pillow==10.2.0.20240822",
"types-Pygments==2.18.0.20240506",
"types-requests>=2.30.0", # align with requests
"tomli>=2", # for mypy (Python<=3.10)
"pytest>=6.0",
]
test = [
"pytest>=8.0",
"defusedxml>=0.7.1", # for secure XML/HTML parsing
"cython>=3.0",
"setuptools>=70.0", # for Cython compilation
"typing_extensions>=4.9", # for typing_extensions.Unpack
]
[[project.authors]]
name = "Georg Brandl"
email = "[email protected]"
[project.scripts]
sphinx-build = "sphinx.cmd.build:main"
sphinx-quickstart = "sphinx.cmd.quickstart:main"
sphinx-apidoc = "sphinx.ext.apidoc:main"
sphinx-autogen = "sphinx.ext.autosummary.generate:main"
[tool.flit.module]
name = "sphinx"
[tool.flit.sdist]
include = [
"LICENSE.rst",
"AUTHORS.rst",
"CHANGES.rst",
# Documentation
"doc/",
"CODE_OF_CONDUCT.rst", # used as an include in the Documentation
"EXAMPLES.rst", # used as an include in the Documentation
# Tests
"tests/",
"tox.ini",
# Utilities
"utils/",
"babel.cfg",
]
exclude = [
"doc/_build",
]
[tool.mypy]
files = ["sphinx", "utils", "tests"]
exclude = [
"tests/roots",
# tests/
"^tests/test_events\\.py$",
"^tests/test_quickstart\\.py$",
"^tests/test_search\\.py$",
# tests/test_builders
"^tests/test_builders/test_build_epub\\.py$",
"^tests/test_builders/test_build_gettext\\.py$",
"^tests/test_builders/test_build_latex\\.py$",
"^tests/test_builders/test_build_texinfo\\.py$",
# tests/test_config
"^tests/test_config/test_config\\.py$",
# tests/test_directives
"^tests/test_directives/test_directive_only\\.py$",
"^tests/test_directives/test_directive_other\\.py$",
"^tests/test_directives/test_directive_patch\\.py$",
# tests/test_domains
"^tests/test_domains/test_domain_c\\.py$",
"^tests/test_domains/test_domain_cpp\\.py$",
"^tests/test_domains/test_domain_js\\.py$",
"^tests/test_domains/test_domain_py\\.py$",
"^tests/test_domains/test_domain_py_fields\\.py$",
"^tests/test_domains/test_domain_py_pyfunction\\.py$",
"^tests/test_domains/test_domain_py_pyobject\\.py$",
"^tests/test_domains/test_domain_rst\\.py$",
"^tests/test_domains/test_domain_std\\.py$",
# tests/test_environment
"^tests/test_environment/test_environment_toctree\\.py$",
# tests/test_extensions
"^tests/test_extensions/test_ext_apidoc\\.py$",
"^tests/test_extensions/test_ext_autodoc\\.py$",
"^tests/test_extensions/test_ext_autodoc_autofunction\\.py$",
"^tests/test_extensions/test_ext_autodoc_events\\.py$",
"^tests/test_extensions/test_ext_autodoc_mock\\.py$",
"^tests/test_extensions/test_ext_autosummary\\.py$",
"^tests/test_extensions/test_ext_doctest\\.py$",
"^tests/test_extensions/test_ext_inheritance_diagram\\.py$",
"^tests/test_extensions/test_ext_intersphinx\\.py$",
"^tests/test_extensions/test_ext_napoleon\\.py$",
"^tests/test_extensions/test_ext_napoleon_docstring\\.py$",
# tests/test_intl
"^tests/test_intl/test_intl\\.py$",
# tests/test_pycode
"^tests/test_pycode/test_pycode\\.py$",
"^tests/test_pycode/test_pycode_ast\\.py$",
# tests/test_transforms
"^tests/test_transforms/test_transforms_post_transforms\\.py$",
# tests/test_util
"^tests/test_util/test_util_fileutil\\.py$",
"^tests/test_util/test_util_i18n\\.py$",
"^tests/test_util/test_util_inspect\\.py$",
"^tests/test_util/test_util_logging\\.py$",
"^tests/test_util/test_util_nodes\\.py$",
"^tests/test_util/test_util_rst\\.py$",
"^tests/test_util/test_util_template\\.py$",
"^tests/test_util/test_util_typing\\.py$",
"^tests/test_util/typing_test_data\\.py$",
# tests/test_writers
]
check_untyped_defs = true
python_version = "3.10"
show_column_numbers = true
show_error_context = true
strict_optional = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unused_ignores = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
no_implicit_reexport = true
extra_checks = true
enable_error_code = [
"type-arg",
"redundant-self",
"truthy-iterable",
"ignore-without-code",
"unused-awaitable",
]
[[tool.mypy.overrides]]
module = [
"sphinx.domains.c",
"sphinx.domains.c._ast",
"sphinx.domains.c._parser",
"sphinx.domains.c._symbol",
"sphinx.domains.cpp",
"sphinx.domains.cpp._ast",
"sphinx.domains.cpp._parser",
"sphinx.domains.cpp._symbol",
]
strict_optional = false
[[tool.mypy.overrides]]
module = [
"sphinx.application",
"sphinx.config",
"sphinx.domains",
"sphinx.domains.c",
"sphinx.domains.cpp",
"sphinx.events",
"sphinx.ext.autodoc",
"sphinx.ext.autodoc.importer",
"sphinx.ext.doctest",
"sphinx.ext.graphviz",
"sphinx.ext.inheritance_diagram",
"sphinx.ext.intersphinx._load",
"sphinx.ext.napoleon.docstring",
"sphinx.highlighting",
"sphinx.jinja2glue",
"sphinx.registry",
"sphinx.search",
"sphinx.util",
"sphinx.util.docfields",
"sphinx.util.docutils",
"sphinx.util.i18n",
"sphinx.util.inspect",
"sphinx.util.logging",
"sphinx.util.parallel",
"sphinx.util.template",
]
disallow_any_generics = false
[[tool.mypy.overrides]]
module = [
"imagesize",
"snowballstemmer",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"tests.*",
]
disallow_untyped_defs = false
[tool.pytest.ini_options]
minversion = "6.0"
addopts = [
"-ra",
"--import-mode=prepend",
# "--pythonwarnings=error",
"--strict-config",
"--strict-markers",
]
empty_parameter_set_mark = "xfail"
filterwarnings = [
"all",
"ignore::DeprecationWarning:docutils.io",
"ignore:Distutils was imported before Setuptools:UserWarning:_distutils_hack",
"ignore:Setuptools is replacing distutils:UserWarning:_distutils_hack",
"ignore::DeprecationWarning:pyximport.pyximport",
"ignore::ImportWarning:importlib._bootstrap",
]
log_cli_level = "INFO"
markers = [
"apidoc",
]
testpaths = ["tests"]
xfail_strict = true
[tool.coverage.run]
branch = true
parallel = true
source = ['sphinx']
[tool.coverage.report]
exclude_lines = [
# Have to re-enable the standard pragma
'pragma: no cover',
# Don't complain if tests don't hit defensive assertion code:
'raise NotImplementedError',
# Don't complain if non-runnable code isn't run:
'if __name__ == .__main__.:',
]
ignore_errors = true