-
Notifications
You must be signed in to change notification settings - Fork 14
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
sub classes appear as miscellaneous #16
Comments
Hi @maeddlae! Thanks again for your report! Could you please be a bit more explicit? Because I could not reproduce this problemDo I get you right, that if you have something like class A:
"Doc of A"
pass
class B(A):
"Doc of B"
pass in a file named
? |
Sorry for answering that late. I didn't see your question earlier. Here is an example: class A():
"""
Class A docstring
"""
class SubClassOfA():
"""
Class SubClassOfA docstring
"""
def __init__(self):
"""
Init of class SubClassOfA
"""
pass
def __init__(self):
"""
Init of class A
"""
pass
def met1(self):
"""
Method 1 of class A
"""
pass |
Hi @maeddlae! Thanks for the clarification 😄 As workaround, you can define your own grouper in def grouper(app, what, name, obj, section, parent):
if isinstance(obj, type) and isinstance(parent, type):
return "Class"
def setup(app):
app.connect('autodocsumm-grouper', grouper) However, we can also change the current behaviour of autodocsumm. Any suggestion, under which section the |
Hmm, I would say just "Class" would be ok. But Python calls them "Inner Class" or "Nested Class", see https://pythonspot.com/inner-classes/. |
This commit fixes #16 and adds a new *Classes* section for the AutoSummClassDocumenter
Agreed. I just implemented the necessary changes in #17 which then closes this issue. Would you mind confirming that it fulfills the request? |
The text was updated successfully, but these errors were encountered: