Skip to content

Commit

Permalink
Run sourcery
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubAndrysek committed May 26, 2023
1 parent d11e40b commit c246cdf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ clean:

# Testing
reviewCode:
sourcery review mkdoxy --in-place
sourcery review pyspacemouse --in-place

install-dev:
python3 -m pip install --force --editable .
Expand Down
12 changes: 4 additions & 8 deletions pyspacemouse/pyspacemouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,10 @@ def list_devices():
devices = []
try:
hid = Enumeration()
except AttributeError:
raise Exception("HID API is probably not installed. See README.md for details.")
except AttributeError as e:
raise Exception(
"HID API is probably not installed. See README.md for details."
) from e

all_hids = hid.find()

Expand Down Expand Up @@ -792,14 +794,8 @@ def check_config(callback=None, dof_callback=None, dof_callback_arr=None, button
"""Check that the input configuration has the correct components.
Raise an exception if it encounters incorrect component.
"""
if callback and callable(callback):
pass
if dof_callback and callable(dof_callback):
pass
if dof_callback_arr and check_dof_callback_arr(dof_callback_arr):
pass
if button_callback and callable(button_callback):
pass
if button_callback_arr and check_button_callback_arr(button_callback_arr):
pass

Expand Down

0 comments on commit c246cdf

Please sign in to comment.