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:
class Normal(Continuous):
"""Normal distribution.
Attributes:
low_chol: Lower-triangular Cholesky factor of covariance matrix.
precision: Precision matrix corresponding to covariance matrix.
logpdf_const: Constant for evaluation of log-PDF.
"""
low_chol: np.ndarray
precision: np.ndarray
logpdf_const: np.float64
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
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