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

Projects
None yet
2 participants
@mikalstill
Copy link
Contributor

mikalstill commented Jan 11, 2019

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'

Expose the pullup resistor constants to API users.
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

This comment has been minimized.

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?

Build fails because of flake8 violations; please add noqa comments

@mikalstill

This comment has been minimized.

Copy link
Contributor

mikalstill commented Jan 11, 2019

No problems, done.

@rm-hull

This comment has been minimized.

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

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@rm-hull

This comment has been minimized.

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

This comment has been minimized.

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