-
-
Notifications
You must be signed in to change notification settings - Fork 32
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] Wrong docstrings for attribute when aliased from another class #141
Comments
Two more bits of additional context. (1.) the design pattern of aliasing a class definition as a class variable can be seen in a few projects that use Sphinx docs, such as:
^ So personally, I was expecting behavior similar to this as the default. (2.) Maybe it is possible that @aminalaee disagrees with me, but as far as I am concerned, it is unclear whether the true problem is (A) that As far as I can tell, implementing a solution to either 1 of the 2 problems above would seem to work for the sqladmin documentation? |
Hi, thanks for the report. That's a very good understanding of the current situation. Griffe and the new handler will definitely support |
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:
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
throughmkdocstrings
and if relevant, please attach a screenshot.System (please complete the following information):
pytkdocs
version [e.g. 0.2.1]Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: