Skip to content

Commit

Permalink
refactor: Update code for Griffe 0.49
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Aug 15, 2024
1 parent 7abf89d commit b975f7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/griffe_inherited_docstrings/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
from __future__ import annotations

import contextlib
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any

from griffe import Extension
from griffe.exceptions import AliasResolutionError
from griffe import AliasResolutionError, Extension

if TYPE_CHECKING:
from griffe import Docstring, Module, Object
Expand Down Expand Up @@ -40,6 +39,6 @@ def _inherit_docstrings(obj: Object) -> None:
class InheritDocstringsExtension(Extension):
"""Griffe extension for inheriting docstrings."""

def on_package_loaded(self, *, pkg: Module) -> None:
def on_package_loaded(self, *, pkg: Module, **kwargs: Any) -> None: # noqa: ARG002
"""Inherit docstrings from parent classes once the whole package is loaded."""
_inherit_docstrings(pkg)
3 changes: 1 addition & 2 deletions tests/test_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from __future__ import annotations

from griffe.extensions import Extensions
from griffe.tests import temporary_visited_package
from griffe import Extensions, temporary_visited_package

from griffe_inherited_docstrings import InheritDocstringsExtension

Expand Down

0 comments on commit b975f7f

Please sign in to comment.