Add missing 'toc' type for 'empty_glob' subtype#14325
Open
gastmaier wants to merge 1 commit intosphinx-doc:masterfrom
Open
Add missing 'toc' type for 'empty_glob' subtype#14325gastmaier wants to merge 1 commit intosphinx-doc:masterfrom
gastmaier wants to merge 1 commit intosphinx-doc:masterfrom
Conversation
Fixes: "Allow suppressing ``toctree`` glob patterns (sphinx-doc#13230)
|
[build-system]
requires = ["flit_core>=3.12"]
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.Documentation = "https://www.sphinx-doc.org/"
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 = "BSD-2-Clause"
license-files = [
"LICENSE.rst",
]
requires-python = ">=3.12"
# 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 :: Information Technology",
"Intended Audience :: Other Audience",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"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 :: Education",
"Topic :: Internet :: WWW/HTTP :: Site Management",
"Topic :: Internet :: WWW/HTTP :: Site Management :: Link Checking",
"Topic :: Printing",
"Topic :: Software Development",
"Topic :: Software Development :: Documentation",
"Topic :: Text Editors :: 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 :: Text Processing :: Markup :: Markdown",
"Topic :: Text Processing :: Markup :: reStructuredText",
"Topic :: Text Processing :: Markup :: XML",
"Topic :: Utilities",
"Typing :: Typed",
]
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.21,<0.23",
"snowballstemmer>=2.2",
"babel>=2.13",
"alabaster>=0.7.14",
"imagesize>=1.3",
"requests>=2.30.0",
"roman-numerals>=1.0.0",
"packaging>=23.0",
"colorama>=0.4.6; sys_platform == 'win32'",
]
dynamic = ["version"]
[[project.authors]]
name = "Adam Turner"
email = ***@***.***"
[[project.authors]]
name = "Georg Brandl"
email = ***@***.***"
[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"
[dependency-groups]
docs = [
"sphinxcontrib-websupport",
]
lint = [
"ruff==0.14.9",
"sphinx-lint>=0.9",
]
package = [
"build",
"pypi-attestations==0.0.28",
"twine>=6.1",
]
test = [
"pytest>=9.0",
"pytest-xdist[psutil]>=3.4",
"cython>=3.0", # for Cython compilation
"defusedxml>=0.7.1", # for secure XML/HTML parsing
"setuptools>=70.0", # for Cython compilation
"typing_extensions>=4.9", # for typing_extensions.Unpack
]
translations = [
"babel>=2.13",
"Jinja2>=3.1",
]
types = [
"mypy==1.19.1",
"pyrefly",
"pyright==1.1.407",
"ty",
{ include-group = "type-stubs" },
]
type-stubs = [
# align with versions used elsewhere
"types-colorama==0.4.15.20250801",
"types-defusedxml==0.7.0.20250822",
"types-docutils==0.22.3.20251115",
"types-Pillow==10.2.0.20240822",
"types-Pygments==2.19.0.20251121",
"types-requests==2.32.4.20250913",
"types-urllib3==1.26.25.14",
]
[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 = [
"doc/conf.py",
"doc/development/tutorials/examples/autodoc_intenum.py",
"doc/development/tutorials/examples/helloworld.py",
"sphinx",
"tests",
"utils",
]
exclude = [
"tests/roots",
]
python_version = "3.12"
strict = true
show_column_numbers = true
show_error_context = true
strict_equality = false
warn_return_any = false
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 = [
"imagesize",
"pyximport",
"snowballstemmer",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
# tests/
"tests.test_search",
# tests/test_config
"tests.test_config.test_config",
# tests/test_directives
"tests.test_directives.test_directive_other",
# tests/test_domains
"tests.test_domains.test_domain_c",
"tests.test_domains.test_domain_cpp",
"tests.test_domains.test_domain_js",
"tests.test_domains.test_domain_py",
"tests.test_domains.test_domain_py_fields",
"tests.test_domains.test_domain_py_pyfunction",
"tests.test_domains.test_domain_py_pyobject",
"tests.test_domains.test_domain_std",
# tests/test_environment
"tests.test_environment.test_environment_toctree",
# tests/test_ext_autodoc
"tests.test_ext_autodoc.test_ext_autodoc",
"tests.test_ext_autodoc.test_ext_autodoc_mock",
# tests/test_ext_autosummary
"tests.test_ext_autosummary.test_ext_autosummary",
# tests/test_ext_intersphinx
"tests.test_ext_intersphinx.test_ext_intersphinx",
# tests/test_ext_napoleon
"tests.test_ext_napoleon.test_ext_napoleon_docstring",
# tests/test_extensions
"tests.test_extensions.test_ext_apidoc",
"tests.test_extensions.test_ext_inheritance_diagram",
# tests/test_util
"tests.test_util.test_util_inspect",
"tests.test_util.test_util_nodes",
"tests.test_util.test_util_typing",
]
check_untyped_defs = false
disable_error_code = [
"annotation-unchecked",
]
disallow_untyped_calls = false
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = ["tests.test_util.typing_test_data"]
ignore_errors = 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
[tool.pyright]
typeCheckingMode = "strict"
include = [
"doc/conf.py",
"doc/development/tutorials/examples/autodoc_intenum.py",
"doc/development/tutorials/examples/helloworld.py",
"sphinx",
"tests",
"utils",
]
exclude = [
"tests/roots",
]
reportArgumentType = "none"
reportAssignmentType = "none"
reportAttributeAccessIssue = "none"
reportCallIssue = "none"
reportConstantRedefinition = "none"
reportGeneralTypeIssues = "none"
reportIncompatibleMethodOverride = "none"
reportIncompatibleVariableOverride = "none"
reportIndexIssue = "none"
reportInvalidTypeForm = "none"
reportMissingImports = "none"
reportMissingModuleSource = "none"
reportMissingParameterType = "none"
reportMissingTypeArgument = "none"
reportMissingTypeStubs = "none"
reportOperatorIssue = "none"
reportOptionalMemberAccess = "none"
reportOptionalSubscript = "none"
reportPossiblyUnboundVariable = "none"
reportPrivateUsage = "none"
reportRedeclaration = "none"
reportReturnType = "none"
reportUnknownArgumentType = "none"
reportUnknownLambdaType = "none"
reportUnknownMemberType = "none"
reportUnknownParameterType = "none"
reportUnknownVariableType = "none"
reportUnnecessaryComparison = "none"
reportUnnecessaryIsInstance = "none"
reportUntypedBaseClass = "none"
reportUntypedNamedTuple = "none"
reportUnusedClass = "none"
reportUnusedFunction = "none"
reportUnusedImport = "none"
reportUnusedVariable = "none"
[tool.uv]
default-groups = "all"
El vie, 27 de feb de 2026, 16:48, Jorge Marques ***@***.***>
escribió:
… Purpose
#13230 <#13230> introduced
toc.empty_glob subtype, but forgot to set the type.
Due to this, the type has no effect.
The purpose of the suppressed warning is for "sparse" documentation
builds, like this
# + intersphinx_disabled_reftypes set to []
exclude_patterns = [
# ...
'large_path',
'huge_docs',
# ...
]
suppress_warnings = [
'toc.excluded',
'toc.empty_glob',
]
This allows to work on huge docs as if they were a few pages (with the
magic trick of deferring the inventory using intersphinx)
References
- #13230 <#13230>
------------------------------
You can view, comment on, or merge this pull request online at:
#14325
Commit Summary
- e55665b
<e55665b>
Add missing 'toc' type for 'empty_glob' subtype
File Changes
(3 files <https://github.com/sphinx-doc/sphinx/pull/14325/files>)
- *M* AUTHORS.rst
<https://github.com/sphinx-doc/sphinx/pull/14325/files#diff-4e28079e8f9a4e208ee815c55aa8f1d87ca0698da61f044486ca60de48e7a525>
(1)
- *M* CHANGES.rst
<https://github.com/sphinx-doc/sphinx/pull/14325/files#diff-ff3c479edefad986d2fe6fe7ead575a46b086e3bbcf0ccc86d85efc4a4c63c79>
(1)
- *M* sphinx/directives/other.py
<https://github.com/sphinx-doc/sphinx/pull/14325/files#diff-a68cbfeb43e003c589e200f48934f2260b5ff3086e65315d7745a73f5f5ddd1b>
(1)
Patch Links:
- https://github.com/sphinx-doc/sphinx/pull/14325.patch
- https://github.com/sphinx-doc/sphinx/pull/14325.diff
—
Reply to this email directly, view it on GitHub
<#14325>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/B6UT3OPQIRALWMZPDH2JBSL4ODCVBAVCNFSM6AAAAACWCHWYU2VHI2DSMVQWIX3LMV43ASLTON2WKOZUGAYDGMJZGE3TCNI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
#13230 introduced
toc.empty_globsubtype, but forgot to set the type.Due to this, the type has no effect.
The purpose of the suppressed warning is for "sparse" documentation builds, like this
This allows to work on huge docs as if they were a few pages (with the magic trick of deferring the inventory using intersphinx)
References