Skip to content

Commit 41a2683

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

19 files changed

+38
-20
lines changed

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""The configuration for this packages documentation."""
2+
23
from datetime import date
34

45
from autodoc2 import __version__

src/autodoc2/analysis.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
The core function though `analyse_module` is agnostic to the implementation,
44
It simply yields `ItemData` typed-dicts.
55
"""
6+
67
from __future__ import annotations
78

89
from dataclasses import dataclass, replace

src/autodoc2/astroid_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
"""Utilities for working with astroid nodes.
2-
"""
1+
"""Utilities for working with astroid nodes."""
2+
33
from __future__ import annotations
44

55
import builtins

src/autodoc2/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""CLI for the package."""
2+
23
from pathlib import Path
34
import re
45
import typing as t

src/autodoc2/config.py

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""The configuration for the extension."""
2+
23
from __future__ import annotations
34

45
from copy import deepcopy
@@ -311,24 +312,24 @@ class Config:
311312
},
312313
)
313314

314-
hidden_objects: set[
315-
t.Literal["undoc", "dunder", "private", "inherited"]
316-
] = dc.field(
317-
default_factory=lambda: {"inherited"},
318-
metadata={
319-
"help": (
320-
"The default hidden items. "
321-
"Can contain:\n"
322-
"- `undoc`: undocumented objects\n"
323-
"- `dunder`: double-underscore methods, e.g. `__str__`\n"
324-
"- `private`: single-underscore methods, e.g. `_private`\n"
325-
"- `inherited`: inherited class methods\n"
326-
),
327-
"sphinx_type": list,
328-
"sphinx_validate": _validate_hidden_objects,
329-
"doc_type": 'list["undoc" | "dunder" | "private" | "inherited"]',
330-
"category": "render",
331-
},
315+
hidden_objects: set[t.Literal["undoc", "dunder", "private", "inherited"]] = (
316+
dc.field(
317+
default_factory=lambda: {"inherited"},
318+
metadata={
319+
"help": (
320+
"The default hidden items. "
321+
"Can contain:\n"
322+
"- `undoc`: undocumented objects\n"
323+
"- `dunder`: double-underscore methods, e.g. `__str__`\n"
324+
"- `private`: single-underscore methods, e.g. `_private`\n"
325+
"- `inherited`: inherited class methods\n"
326+
),
327+
"sphinx_type": list,
328+
"sphinx_validate": _validate_hidden_objects,
329+
"doc_type": 'list["undoc" | "dunder" | "private" | "inherited"]',
330+
"category": "render",
331+
},
332+
)
332333
)
333334

334335
hidden_regexes: list[t.Pattern[str]] = dc.field(

src/autodoc2/db.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""A database interface for storing and querying the analysis items."""
2+
23
from __future__ import annotations
34

45
import json

src/autodoc2/render/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Convert the database items into documentation."""
2+
23
# note, for the directives and options see:
34
# https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html
45
from __future__ import annotations

src/autodoc2/render/myst_.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Renderer for MyST."""
2+
23
from __future__ import annotations
34

45
import re

src/autodoc2/render/rst_.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Renderer for reStructuredText."""
2+
23
from __future__ import annotations
34

45
import re

src/autodoc2/resolve_all.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Handling of ``__all__`` resolution."""
2+
23
from __future__ import annotations
34

45
import typing as t

0 commit comments

Comments
 (0)