Skip to content

Commit dbfb2b4

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ec34fed commit dbfb2b4

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

docs/conf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,12 @@
9696

9797
import typing as t # noqa: E402
9898

99-
from autodoc2.config import CONFIG_PREFIX, Config, PackageConfig # noqa: E402
10099
from docutils import nodes # noqa: E402
101100
from sphinx.application import Sphinx # noqa: E402
102101
from sphinx.util.docutils import SphinxDirective # noqa: E402
103102

103+
from autodoc2.config import CONFIG_PREFIX, Config, PackageConfig # noqa: E402
104+
104105

105106
def setup(app: Sphinx) -> None:
106107
app.add_object_type(
@@ -122,7 +123,7 @@ def run(self) -> t.List[nodes.Node]:
122123
config = Config()
123124
for name, value, field in config.as_triple():
124125
text.append(f"``````{{confval}} {CONFIG_PREFIX}{name}")
125-
text.append(f'{field.metadata.get("help", "")}')
126+
text.append(f"{field.metadata.get('help', '')}")
126127
text.append("")
127128
# if "category" in field.metadata:
128129
# text.append(f"**category**: { field.metadata['category']}")
@@ -156,7 +157,7 @@ def run(self) -> t.List[nodes.Node]:
156157
pkg_config = PackageConfig("")
157158
for name, value, field in pkg_config.as_triple():
158159
text.append(f"``````{{confval}} {CONFIG_PREFIX}packages[{name}]")
159-
text.append(f'{field.metadata.get("help", "")}')
160+
text.append(f"{field.metadata.get('help', '')}")
160161
text.append("")
161162
type_ = type_to_string(field.type)
162163
text.append(f"**type**: {type_}")

src/autodoc2/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def list_items(
109109
if not private and data["full_name"].split(".")[-1].startswith("_"):
110110
continue
111111
if one_line:
112-
console.print(f'{data["full_name"]} ({data["type"]})')
112+
console.print(f"{data['full_name']} ({data['type']})")
113113
else:
114114
console.print(data)
115115

tests/test_analyse_module.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
import typing as t
66

7-
from autodoc2.analysis import analyse_module
87
import pytest
98

9+
from autodoc2.analysis import analyse_module
10+
1011

1112
def clean_item(item: dict[str, t.Any]) -> dict[str, t.Any]:
1213
"""Remove non-deterministic data."""

tests/test_render.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44
from pathlib import Path
55
from textwrap import dedent
66

7+
import pytest
8+
from sphinx.testing.util import SphinxTestApp
9+
from sphinx.testing.util import path as sphinx_path
10+
711
from autodoc2.analysis import analyse_module
812
from autodoc2.config import Config
913
from autodoc2.db import InMemoryDb
1014
from autodoc2.render.base import RendererBase
1115
from autodoc2.render.myst_ import MystRenderer
1216
from autodoc2.render.rst_ import RstRenderer
1317
from autodoc2.utils import yield_modules
14-
import pytest
15-
from sphinx.testing.util import SphinxTestApp
16-
from sphinx.testing.util import path as sphinx_path
1718

1819

1920
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)