adafruit / Adafruit_CircuitPython_HID

USB Human Interface Device drivers.
MIT License
364 stars 106 forks source link

fix gamepad examples #76

Closed FoamyGuy closed 2 years ago

FoamyGuy commented 2 years ago

resolves #71

The changes in this PR:

I tested hid_gamepad.py and the two examples that make use of it on a Feather RP2040 with 7.0.0 alpha6

FoamyGuy commented 2 years ago

Hmmm, pre-commit passed successfully when I ran it locally:

❯ pre-commit run --all-files
black....................................................................Passed
reuse....................................................................Passed
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
pylint (library code)....................................................Passed
pylint (examples code)...................................................Passed

Perhaps there are differing versions of pylint or something else different about my environment. I'll try to look into why it failed in the actions check.

FoamyGuy commented 2 years ago

Indeed the PyLint failure seems to be related to version 2.10 of PyLint which was released a few hours ago https://github.com/PyCQA/pylint/releases/tag/v2.10.0

I installed that version locally and now my local pre-commit fails the same way that the one inside the actions run is.

To verify I installed version 2.9.6 which was the previous release version and with that version pre-commit runs and completes successfully.

FoamyGuy commented 2 years ago

More information about the pylint failure can be found here: https://github.com/PyCQA/pylint/issues/4883

dhalbert commented 2 years ago

pylint 2.10.1 with a fix for this (https://github.com/PyCQA/pylint/pull/4884) has been released on pypi.org. I re-ran the CI and it works fine now.