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

Errors: shake up how error digests are triggered, catch ints supplied as pin labels. #3

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

Gadgetoid
Copy link
Member

This change is mostly to shake up how errors are presented when calling gpiodevice.find_chip_by_pins using outdated, integer pin numbers. IE:

gpiodevice.find_chip_by_pins(1) will produce the errors:

Woah there, suitable gpiochip not found!
  ⚠️   /dev/gpiochip4: 1 is an int and has been skipped, did you mean "PIN1" or "GPIO1"?
  ⚠️   /dev/gpiochip3: 1 is an int and has been skipped, did you mean "PIN1" or "GPIO1"?
  ⚠️   /dev/gpiochip2: 1 is an int and has been skipped, did you mean "PIN1" or "GPIO1"?
  ⚠️   /dev/gpiochip1: 1 is an int and has been skipped, did you mean "PIN1" or "GPIO1"?
  ⚠️   /dev/gpiochip0: 1 is an int and has been skipped, did you mean "PIN1" or "GPIO1"?

Copy link

Pull Request Test Coverage Report for Build 6897064722

  • 25 of 33 (75.76%) changed or added relevant lines in 4 files are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+7.0%) to 41.86%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tests/conftest.py 5 7 71.43%
gpiodevice/init.py 6 12 50.0%
Files with Coverage Reduction New Missed Lines %
gpiodevice/init.py 4 25.74%
Totals Coverage Status
Change from base Build 6731862195: 7.0%
Covered Lines: 90
Relevant Lines: 215

💛 - Coveralls

@Gadgetoid Gadgetoid merged commit 92fb9ae into main Dec 5, 2023
7 checks passed
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.

1 participant