Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Extend the "explicit better than implicit" and reduce use of **kwargs #69

Open
sonelu opened this issue May 29, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@sonelu
Copy link
Owner

sonelu commented May 29, 2020

Is your feature request related to a problem? Please describe.
Many classes use **kwargs and only define in the constructor the parameters they use, passing the rest to the super().
This makes for uncomfortable reading of the documentation and understanding of the parameters that need to be supplied to constructor.

Describe the solution you'd like
Even though it might tedious, we should copy the parameters from super classes into classes and eliminate the **kwargs.

Describe alternatives you've considered
Using the **kwargs makes for shorted code, but less clear and passing misspelled arguments (ex. from YAML) goes unnoticed while the function they are supposed to provide is defaulted.

Additional context
Check for instance the Joint, JointPV, JointPVL.

@sonelu sonelu added the enhancement New feature or request label May 29, 2020
@sonelu sonelu added this to the Release 0.1 milestone May 29, 2020
@sonelu sonelu self-assigned this May 29, 2020
@sonelu
Copy link
Owner Author

sonelu commented Jun 11, 2020

Changes made for base.thread.BaseThread and all subclasses (including Syncs and Script).

Rest of classes to be updated in v0.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant