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

Expose the pullup resistor constants to API users. #33

Merged
merged 2 commits into from Jan 11, 2019

Conversation

mikalstill
Copy link
Contributor

These weren't being exposed as part of the GPIO module, so callers
were getting error messages like this:

$ python ../gpio_button_edge_detect.py
Traceback (most recent call last):
File "../gpio_button_edge_detect.py", line 11, in
GPIO.setup(pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
AttributeError: module 'OPi.GPIO' has no attribute 'PUD_DOWN'

These weren't being exposed as part of the GPIO module, so callers
were getting error messages like this:

$ python ../gpio_button_edge_detect.py
Traceback (most recent call last):
  File "../gpio_button_edge_detect.py", line 11, in <module>
    GPIO.setup(pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
AttributeError: module 'OPi.GPIO' has no attribute 'PUD_DOWN'
rm-hull
rm-hull previously approved these changes Jan 11, 2019
@rm-hull
Copy link
Owner

rm-hull commented Jan 11, 2019

@mikalstill the QA check failed ... have a look at https://travis-ci.org/rm-hull/OPi.GPIO/jobs/478266740#L696. I think we probably need a noqa comment on those three lines to ignore the F401 error. See http://flake8.pycqa.org/en/3.1.1/user/ignoring-errors.html#in-line-ignoring-errors for details.

Could you amend the PR please?

@rm-hull rm-hull dismissed their stale review January 11, 2019 13:07

Build fails because of flake8 violations; please add noqa comments

@mikalstill
Copy link
Contributor Author

No problems, done.

@rm-hull
Copy link
Owner

rm-hull commented Jan 11, 2019

thank you

@rm-hull rm-hull merged commit 0e00d73 into rm-hull:master Jan 11, 2019
@rm-hull
Copy link
Owner

rm-hull commented Jan 11, 2019

I'll push out a new release with this change in over the weekend.

@rm-hull
Copy link
Owner

rm-hull commented Jan 14, 2019

https://pypi.org/project/OPi.GPIO/0.3.6/ released with this change

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.

None yet

2 participants