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

Derived classes do not work - fix names of class members in mcp230xx.py #105

Merged
merged 1 commit into from
Mar 2, 2021

Conversation

Jockra
Copy link
Contributor

@Jockra Jockra commented Jan 6, 2021

At least switching on the internal pull up resistors does not work, because of missing underscores of class member variables ( self._gpio, self._iodir, self._gppu). The derived class used its own variables.

@CrazyIvan359
Copy link
Owner

Crap... I changed the registers from private (underscore) to public (no underscore) in #96 because of the warnings about accessing private attributes, I must have forgotten to do the same in the subclasses. Thanks for making a fix!

Occurrences of _gpio, _iodir, and _gppu should be changed to gpio, iodir, and gppu.

Also to pass the checks, if you are using VSCode, install the Python and Pylance extensions and install the formatter with pip install black. After that you can open the workspace file and code will be formatted automatically and errors will be highlighted. I will be adding instructions for that to CONTRIBUTING.md but have not gotten to it yet.

@CrazyIvan359 CrazyIvan359 merged commit c9a0bb0 into CrazyIvan359:master Mar 2, 2021
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

Successfully merging this pull request may close these issues.

2 participants