Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: inherited_members does not get docstring for @abstractmethod #233

Closed
osamimi opened this issue Jan 27, 2025 · 1 comment
Closed

bug: inherited_members does not get docstring for @abstractmethod #233

osamimi opened this issue Jan 27, 2025 · 1 comment
Assignees
Labels
griffe extension Can be solved with a Griffe extension

Comments

@osamimi
Copy link

osamimi commented Jan 27, 2025

mkdocstrings-python v1.13.0
mkdocstrings[python] v0.27.0
mkdocs-material v9.5.50
mkdocs v1.6.1

With inherited_members globally enabled, and the following example:

class AbstractBase(ABC):
    @abstractmethod
    def example_method(self) -> int:
        """example_method abstractmethod docstring"""
        pass


class MyClass(AbstractBase):
    def example_method(self) -> int:
        return 1

I see the following. Note that Myclass::example_method is listed, but without the docstring that is written in AbstractBase::example_method. I expect to see 'example_method abstractmethod docstring' under Myclass::example_method as well.

Image

@osamimi osamimi added the unconfirmed This bug was not reproduced yet label Jan 27, 2025
@pawamoy
Copy link
Member

pawamoy commented Jan 27, 2025

Hi @osamimi, thanks for the report 🙂

This is expected, you'll have to use this official extension: https://mkdocstrings.github.io/griffe/extensions/official/inherited-docstrings/, or third-party alternatives.

Closing, feel free to comment further!

@pawamoy pawamoy closed this as not planned Won't fix, can't repro, duplicate, stale Jan 27, 2025
@pawamoy pawamoy added griffe extension Can be solved with a Griffe extension and removed unconfirmed This bug was not reproduced yet labels Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
griffe extension Can be solved with a Griffe extension
Projects
None yet
Development

No branches or pull requests

2 participants