diff --git a/pyproject.toml b/pyproject.toml index d9217a5f..16cebe87 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,7 @@ optional-dependencies.dev = [ "deptry==0.20.0", "doc8==1.1.2", "doccmd==2024.10.8.12", + "docformatter==1.7.5", "interrogate==1.7.0", "mypy==1.11.2", "myst-parser==4.0.0", @@ -67,7 +68,6 @@ optional-dependencies.dev = [ "sphinx[test]==8.0.2", "types-docutils==0.21.0.20241005", "vulture==2.13", - "docformatter==1.7.5", ] optional-dependencies.release = [ "check-wheel-contents==0.6.0" ] urls.Source = "https://github.com/adamtheturtle/sphinx-substitution-extensions" diff --git a/sample/source/__init__.py b/sample/source/__init__.py index 535ceb2e..b63eed5f 100644 --- a/sample/source/__init__.py +++ b/sample/source/__init__.py @@ -1 +1,3 @@ -"""Documentation.""" +""" +Documentation. +""" diff --git a/src/sphinx_substitution_extensions/__init__.py b/src/sphinx_substitution_extensions/__init__.py index cac48371..240b4865 100644 --- a/src/sphinx_substitution_extensions/__init__.py +++ b/src/sphinx_substitution_extensions/__init__.py @@ -74,7 +74,9 @@ def run(self) -> list[Node]: @beartype class SubstitutionCodeRole: - """Custom role for substitution code.""" + """ + Custom role for substitution code. + """ options: ClassVar[dict[str, Any]] = { "class": directives.class_option, @@ -115,7 +117,9 @@ def __call__( # pylint: disable=dangerous-default-value @beartype class SubstitutionXRefRole(XRefRole): - """Custom role for XRefs.""" + """ + Custom role for XRefs. + """ def process_link( self, diff --git a/tests/conftest.py b/tests/conftest.py index 797fcf50..831e6e04 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,6 @@ -"""Configuration for pytest.""" +""" +Configuration for pytest. +""" import pytest from beartype import beartype diff --git a/tests/test_substitution_extensions.py b/tests/test_substitution_extensions.py index 38554aa8..0941e38c 100644 --- a/tests/test_substitution_extensions.py +++ b/tests/test_substitution_extensions.py @@ -197,8 +197,7 @@ def test_substitution_download( ) -> None: """ The ``substitution-download`` role replaces the placeholders defined in - ``conf.py`` as specified in both the download text and the download - target. + ``conf.py`` as specified in both the download text and the download target. """ source_directory = tmp_path / "source" source_directory.mkdir()