Comments (5)
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 test.py
, then B
appears under the miscellaneous
section in
.. automodule:: test
:autosummary:
:members:
?
from autodocsumm.
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
The generated API then looks like this:
from autodocsumm.
Hi @maeddlae! Thanks for the clarification 😄 As workaround, you can define your own grouper in conf.py
, for example
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 SubClassOfA
should appear? Maybe Member classes?
from autodocsumm.
Hmm, I would say just "Class" would be ok. But Python calls them "Inner Class" or "Nested Class", see https://pythonspot.com/inner-classes/.
from autodocsumm.
Agreed. I just implemented the necessary changes in #17 which then closes this issue. Would you mind confirming that it fulfills the request?
from autodocsumm.
Related Issues (20)
- 0.2.4: problematic dependencies definition HOT 3
- get_documenters is deprecated in Sphinx 5
- 0.2.5: sphinx warnings HOT 2
- 0.2.5: pytest warnings HOT 2
- Type annotations are not rendered properly HOT 4
- Missing upper bound on sphinx version for `autodocsumm==2.2.x` HOT 1
- No links to items in summary tables when using __init__.py imports HOT 5
- Some way to put documentation on separate pages like sphinx.ext.autosummary HOT 8
- Reference target not found in specific cases HOT 6
- Alias Expands Nested Class Documentation HOT 1
- 0.2.8: sphinx is failing and some refferences warnings HOT 2
- 0.2.8: pytest warnings HOT 1
- Remove attributes for enums
- Sphinx 5 support
- Estimated date for 0.2.9 release? HOT 3
- [FEATURE] Explicit summary directive alignment HOT 6
- Sphinx `ObjectMember`-related deprecations HOT 3
- Sorting sections in the summary HOT 5
- Possible dependency mismatch between Conda and PyPI packages HOT 2
- Surprising effect on attribute documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autodocsumm.