diff --git a/Makefile b/Makefile index c98f649..f8d4f13 100644 --- a/Makefile +++ b/Makefile @@ -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 . diff --git a/pyspacemouse/pyspacemouse.py b/pyspacemouse/pyspacemouse.py index ca29c62..4751449 100644 --- a/pyspacemouse/pyspacemouse.py +++ b/pyspacemouse/pyspacemouse.py @@ -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() @@ -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