Documentation location
https://deepinv.org/api/stubs/deepinv.physics.Blur.html, https://deepinv.org/api/stubs/deepinv.physics.LinearPhysics.html#deepinv.physics.LinearPhysics
Describe the issue or suggestion
We use **kwargs to pass in parameters to the constructor of child classes to their parent classes, which is common practice.
However, this hides important attributes in the documentation: for instance Blur has the noise_model attributes, like all LinearPhysics, but it does not appear in the documentation nor in the function's prototype.
This can hide this information from new users who might not think about looking at the documentation of the parent class.
Another consequence is that these inherited attributes / parameters are hidden from Pylance.
Most users using modern IDEs will either hover their mouse above function description, or auto-complete the function call with the parameters. Both uses Pylance, which will not give any information about the inherited attributes in **kwargs.
Suggested fix or improvement (optional)
A possible solution is to use TypedDict (https://deepinv.org/api/stubs/deepinv.physics.LinearPhysics.html#deepinv.physics.LinearPhysics) and define a set of attributes that should always be visible for classes inheriting from LinearPhysics.
Additional context
No response
Documentation location
https://deepinv.org/api/stubs/deepinv.physics.Blur.html, https://deepinv.org/api/stubs/deepinv.physics.LinearPhysics.html#deepinv.physics.LinearPhysics
Describe the issue or suggestion
We use
**kwargsto pass in parameters to the constructor of child classes to their parent classes, which is common practice.However, this hides important attributes in the documentation: for instance
Blurhas thenoise_modelattributes, like allLinearPhysics, but it does not appear in the documentation nor in the function's prototype.This can hide this information from new users who might not think about looking at the documentation of the parent class.
Another consequence is that these inherited attributes / parameters are hidden from Pylance.
Most users using modern IDEs will either hover their mouse above function description, or auto-complete the function call with the parameters. Both uses Pylance, which will not give any information about the inherited attributes in
**kwargs.Suggested fix or improvement (optional)
A possible solution is to use
TypedDict(https://deepinv.org/api/stubs/deepinv.physics.LinearPhysics.html#deepinv.physics.LinearPhysics) and define a set of attributes that should always be visible for classes inheriting fromLinearPhysics.Additional context
No response