Skip to content

Commit d9aa9bd

Browse files
committed
chore: Re-expose public API in the top-level module
1 parent aee4b19 commit d9aa9bd

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

src/griffe_inherited_docstrings/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55

66
from __future__ import annotations
77

8-
from griffe_inherited_docstrings.extension import InheritDocstringsExtension
8+
from griffe_inherited_docstrings._internal.extension import InheritDocstringsExtension
99

1010
__all__: list[str] = ["InheritDocstringsExtension"]

src/griffe_inherited_docstrings/_internal/extension.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
"""The Griffe extension."""
2-
31
from __future__ import annotations
42

53
import contextlib
@@ -74,6 +72,7 @@ def __init__(self, *, merge: bool = False) -> None:
7472
merge: Whether to merge the docstrings from the parent classes into the docstring of the member.
7573
"""
7674
self.merge = merge
75+
"""Whether to merge the docstrings from the parent classes into the docstring of the member."""
7776

7877
def on_package(self, *, pkg: Module, **kwargs: Any) -> None: # noqa: ARG002
7978
"""Inherit docstrings from parent classes once the whole package is loaded."""
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""Deprecated. Import from `griffe_inherited_docstrings` directly."""
2+
3+
# YORE: Bump 2: Remove file.
4+
5+
import warnings
6+
from typing import Any
7+
8+
from griffe_inherited_docstrings._internal import extension
9+
10+
11+
def __getattr__(name: str) -> Any:
12+
warnings.warn(
13+
"Importing from `griffe_inherited_docstrings.extension` is deprecated. Import from `griffe_inherited_docstrings` directly.",
14+
DeprecationWarning,
15+
stacklevel=2,
16+
)
17+
return getattr(extension, name)

0 commit comments

Comments
 (0)