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

point_class call in Model.load() is not keyworded #78

Open
laelnasan opened this issue Aug 2, 2019 · 1 comment
Open

point_class call in Model.load() is not keyworded #78

laelnasan opened this issue Aug 2, 2019 · 1 comment

Comments

@laelnasan
Copy link
Contributor

Just a simple issue that prevents me to reuse the code with a new class which inherits Point. I can make a pull request to correct it if possible.

At sunspec.core.device.Model.load, line 709:
now:

point = point_class(block, point_type, str(point_addr))

what I'ld like:

point = point_class(block=block, point_type=point_type, addr=str(point_addr))
@altendky
Copy link
Contributor

altendky commented Aug 2, 2019

When you inherit your constructor should be compatible anyways what with super() calls and not actually knowing which constructor it will hit next in the MRO. But I personally do pass named arguments almost always anyways so the change itself seems reasonable.

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

No branches or pull requests

2 participants