Skip to content

[BUG] Wrong docstrings for attribute when aliased from another class #141

@aminalaee

Description

@aminalaee

Describe the bug
As you can see here: https://github.com/aminalaee/sqladmin/blob/main/sqladmin/models.py#L358
We have defined a member to be equal to an external third-party class:

class X:
     form_base_class = wtforms.Form
     """Some docstrings"""

When this class is parsed the parser follows the docstrings in the third-party package and doesn't show the docstrings defined in my docs:

https://aminalaee.github.io/sqladmin/api_reference/model_admin/#sqladmin.models.ModelAdmin.form_base_class

I think either we shouldn't allow this to happen or there should be an option to control this.

As a workaround we found that we can try mkdocstrings-python package but that doesn't follow the members attribute we set and shows unwanted members:

aminalaee/sqladmin#106

To Reproduce
It's already in the description.

Expected behavior

Screenshots
If you are using pytkdocs through mkdocstrings and if relevant, please attach a screenshot.

System (please complete the following information):

  • pytkdocs version [e.g. 0.2.1]
  • Python version: [e.g. 3.8]
  • OS: [Windows/Linux]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions