Skip to content

Commit 34a637c

Browse files
committed
refactor: Expose public objects in top-level module
Also synchronize objects inventory (docs).
1 parent 8a53b41 commit 34a637c

File tree

3 files changed

+89
-3
lines changed

3 files changed

+89
-3
lines changed

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ plugins:
130130
inherited_members: true
131131
merge_init_into_class: true
132132
separate_signature: true
133+
show_if_no_docstring: true
133134
show_root_heading: true
134135
show_root_full_path: false
135136
show_signature_annotations: true

src/griffe_typedoc/__init__.py

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,90 @@
66
from __future__ import annotations
77

88
from griffe_typedoc._internal.cli import get_parser, main
9+
from griffe_typedoc._internal.decoder import TypedocDecoder
10+
from griffe_typedoc._internal.loader import load
11+
from griffe_typedoc._internal.logger import LogLevel, get_logger, patch_loggers
12+
from griffe_typedoc._internal.models import (
13+
Accessor,
14+
BlockTag,
15+
BlockTagContent,
16+
BlockTagContentKind,
17+
BlockTagKind,
18+
CallSignature,
19+
Class,
20+
Comment,
21+
Constructor,
22+
ConstructorSignature,
23+
Enum,
24+
EnumMember,
25+
FileRegistry,
26+
Function,
27+
GetSignature,
28+
Group,
29+
IndexSignature,
30+
Interface,
31+
Method,
32+
Module,
33+
Namespace,
34+
Parameter,
35+
Project,
36+
Property,
37+
Reference,
38+
Reflection,
39+
ReflectionKind,
40+
SetSignature,
41+
Source,
42+
Target,
43+
Type,
44+
TypeAlias,
45+
TypeKind,
46+
TypeLiteral,
47+
TypeParameter,
48+
Variable,
49+
)
950

10-
__all__: list[str] = ["get_parser", "main"]
51+
__all__: list[str] = [
52+
"Accessor",
53+
"BlockTag",
54+
"BlockTagContent",
55+
"BlockTagContentKind",
56+
"BlockTagKind",
57+
"CallSignature",
58+
"Class",
59+
"Comment",
60+
"Constructor",
61+
"ConstructorSignature",
62+
"Enum",
63+
"EnumMember",
64+
"FileRegistry",
65+
"Function",
66+
"GetSignature",
67+
"Group",
68+
"IndexSignature",
69+
"Interface",
70+
"LogLevel",
71+
"Method",
72+
"Module",
73+
"Namespace",
74+
"Parameter",
75+
"Project",
76+
"Property",
77+
"Reference",
78+
"Reflection",
79+
"ReflectionKind",
80+
"SetSignature",
81+
"Source",
82+
"Target",
83+
"Type",
84+
"TypeAlias",
85+
"TypeKind",
86+
"TypeLiteral",
87+
"TypeParameter",
88+
"TypedocDecoder",
89+
"Variable",
90+
"get_logger",
91+
"get_parser",
92+
"load",
93+
"main",
94+
"patch_loggers",
95+
]

src/griffe_typedoc/_internal/loader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
if TYPE_CHECKING:
1414
from griffe_typedoc._internal.models import Project
1515

16-
logger = get_logger(__name__)
16+
_logger = get_logger(__name__)
1717

1818

1919
def _double_brackets(message: str) -> str:
@@ -52,7 +52,7 @@ def load(typedoc_command: str | list[str], working_directory: str = ".") -> Proj
5252
if line := process.stdout.readline().strip(): # type: ignore[union-attr]
5353
level, line = line.split(" ", 1)
5454
level = match.group(1) if (match := re.search(r"\[(\w+)\]", level)) else "info"
55-
getattr(logger, level.lower())(_double_brackets(line))
55+
getattr(_logger, level.lower())(_double_brackets(line))
5656
else:
5757
break
5858
process.wait()

0 commit comments

Comments
 (0)