-
Notifications
You must be signed in to change notification settings - Fork 32
Attribute types missing in documentation #304
Copy link
Copy link
Open
Labels
status: ready to implementSolution for this issue is available but implementation is missingSolution for this issue is available but implementation is missingtopic: documentationIssue/PR related to the documentationIssue/PR related to the documentationtype: usabilityIssue/PR to improve usabilityIssue/PR to improve usability
Metadata
Metadata
Assignees
Labels
status: ready to implementSolution for this issue is available but implementation is missingSolution for this issue is available but implementation is missingtopic: documentationIssue/PR related to the documentationIssue/PR related to the documentationtype: usabilityIssue/PR to improve usabilityIssue/PR to improve usability
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description of the Issue:
When I added type annotations to the distributions (#221) and to the parameters (#240), I removed the types of the class attributes, because modern IDEs automatically resolve the type when you hover over an attribute of interest.
What I didn't take into account is that Sphinx apparently isn't able to do that, and the class attribute types are now missing in the documentation:
Proposed Solution:
The attribute types need to be added again in the following way:
which results in the following documentation:
In contrast to our previous type annotation within the docstring, this approach comes with the advantage that mypy will automatically check whether the attribute types conform to the usage of the attribute in the code.
Action Items:
Related Issues:
#74
Interested Parties:
No response