pdoc
pdoc copied to clipboard
Documentation for instance variables without docstrings
I'm a bit surprised that instance variables aren't automatically picked up if they don't have docstrings. Property methods without docstrings are listed, I'd expect regular instance variables to show up as well.
Expected Behavior
class Test:
one: str
two: str
def __init__(self, value: str) -> None:
self.one = value
"""one docstring."""
self.two = value
@property
def foo(self) -> str:
return self.value
def bar(self) -> int:
pass
should become:
Classes
-------
`Test(value: str)`
:
### Instance variables
`foo`
:
`one`
: one docstring.
`two`
:
### Methods
`bar(self) -> int`
:
(I actually expect the types to show as well for all three instance variables, but that's covered in #121.)
Actual Behavior
Classes
-------
`Test(value: str)`
:
### Instance variables
`foo`
:
`one`
: one docstring.
### Methods
`bar(self) -> int`
:
Steps to Reproduce
See sample code above.
Additional info
- pdoc version: 0.7.4
I expected the same result. Has this feature been added or is this not possible? Truthfully, I don't understand why they shouldn't be listed, @kernc is there a specific reason for this?