Skip to content

Commit

Permalink
Merge branch 'master' into cleanup/current-document
Browse files Browse the repository at this point in the history
# Conflicts:
#	sphinx/directives/__init__.py
#	sphinx/domains/changeset.py
#	tests/test_environment/test_environment.py
  • Loading branch information
AA-Turner committed Nov 22, 2024
2 parents 91410e2 + 0e15ad7 commit 6eca811
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -342,4 +342,4 @@ jobs:
env:
VIRTUALENV_SYSTEM_SITE_PACKAGES: "1"
- name: codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
2 changes: 1 addition & 1 deletion .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ select = [
[lint.per-file-ignores]
"doc/*" = [
"ANN", # documentation doesn't need annotations
"TCH001", # documentation doesn't need type-checking blocks
"TC001", # documentation doesn't need type-checking blocks
]
"doc/conf.py" = ["INP001", "W605"]
"doc/development/tutorials/examples/*" = ["INP001"]
Expand Down
4 changes: 2 additions & 2 deletions doc/man/sphinx-build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Options
.. versionchanged:: 6.2
Add ``--jobs`` long option.

.. option:: -c path, --config-dir path
.. option:: -c path, --conf-dir path

Don't look for the :file:`conf.py` in the source directory, but use the given
configuration directory instead. Note that various other files and paths
Expand All @@ -152,7 +152,7 @@ Options
.. versionadded:: 0.3

.. versionchanged:: 7.3
Add ``--config-dir`` long option.
Add ``--conf-dir`` long option.

.. option:: -C, --isolated

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ docs = [
]
lint = [
"flake8>=6.0",
"ruff==0.7.3",
"ruff==0.8.0",
"mypy==1.13.0",
"sphinx-lint>=0.9",
"types-colorama==0.4.15.20240311",
Expand Down
2 changes: 1 addition & 1 deletion sphinx/_cli/util/colour.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import os
import sys
from collections.abc import Callable # NoQA: TCH003
from collections.abc import Callable # NoQA: TC003

if sys.platform == 'win32':
import colorama
Expand Down
2 changes: 1 addition & 1 deletion sphinx/builders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class Builder:
# doctree versioning method
versioning_method = 'none'
versioning_compare = False
#: Whether it is safe to make parallel :meth:`~.Builder.write_doc()` calls.
#: Whether it is safe to make parallel :meth:`~.Builder.write_doc` calls.
allow_parallel: bool = False
# support translation
use_message_catalog = True
Expand Down
6 changes: 3 additions & 3 deletions sphinx/directives/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
from docutils.parsers.rst import directives, roles

from sphinx import addnodes
from sphinx.addnodes import desc_signature # NoQA: TCH001
from sphinx.addnodes import desc_signature # NoQA: TC001
from sphinx.util import docutils
from sphinx.util.docfields import DocFieldTransformer, Field, TypedField
from sphinx.util.docutils import SphinxDirective
from sphinx.util.typing import ExtensionMetadata, OptionSpec # NoQA: TCH001
from sphinx.util.typing import ExtensionMetadata, OptionSpec # NoQA: TC001

if TYPE_CHECKING:
from docutils.nodes import Node
Expand Down Expand Up @@ -296,7 +296,7 @@ def run(self) -> list[Node]:
'object-description-transform', self.domain, self.objtype, content_node
)
DocFieldTransformer(self).transform_all(content_node)
self.env.current_document.obj_desc_name = ''
self.env.temp_data['object'] = None
self.after_content()

if node['no-typesetting']:
Expand Down
4 changes: 2 additions & 2 deletions sphinx/ext/viewcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def _get_full_modname(modname: str, attribute: str) -> str | None:
return getattr(value, '__module__', None)
except AttributeError:
# sphinx.ext.viewcode can't follow class instance attribute
# then AttributeError logging output only verbose mode.
logger.verbose("Didn't find %s in %s", attribute, modname)
# then AttributeError logging output only debug mode.
logger.debug("Didn't find %s in %s", attribute, modname)
return None
except Exception as e:
# sphinx.ext.viewcode follow python domain directives.
Expand Down
6 changes: 3 additions & 3 deletions sphinx/util/docutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import os
import re
from collections.abc import Sequence # NoQA: TCH003
from collections.abc import Sequence # NoQA: TC003
from contextlib import contextmanager
from copy import copy
from pathlib import Path
Expand All @@ -14,7 +14,7 @@
from docutils import nodes
from docutils.io import FileOutput
from docutils.parsers.rst import Directive, directives, roles
from docutils.parsers.rst.states import Inliner # NoQA: TCH002
from docutils.parsers.rst.states import Inliner # NoQA: TC002
from docutils.statemachine import State, StateMachine, StringList
from docutils.utils import Reporter, unescape

Expand All @@ -29,7 +29,7 @@
)

if TYPE_CHECKING:
from collections.abc import Callable, Iterator # NoQA: TCH003
from collections.abc import Callable, Iterator # NoQA: TC003
from types import ModuleType, TracebackType

from docutils.frontend import Values
Expand Down

0 comments on commit 6eca811

Please sign in to comment.