From fe965bdc5c57eb110b4f6bed5ec3e86fe177e053 Mon Sep 17 00:00:00 2001 From: Alec Delaney <89490472+tekktrik@users.noreply.github.com> Date: Thu, 6 Oct 2022 16:58:36 -0400 Subject: [PATCH 1/2] Fix faulty ValueError message --- adafruit_adxl34x.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_adxl34x.py b/adafruit_adxl34x.py index 6005661..ca88c3f 100755 --- a/adafruit_adxl34x.py +++ b/adafruit_adxl34x.py @@ -390,7 +390,7 @@ def enable_tap_detection( self._enabled_interrupts["tap"] = 2 else: raise ValueError( - "tap must be 0 to disable, 1 for single tap, or 2 for double tap" + "tap_count must be 1 for single tap or 2 for double tap" ) def disable_tap_detection(self) -> None: From f209f8cb159a7971dc682490a5d79acce828400c Mon Sep 17 00:00:00 2001 From: Alec Delaney Date: Thu, 6 Oct 2022 17:14:56 -0400 Subject: [PATCH 2/2] Reformatted via pre-commit --- adafruit_adxl34x.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/adafruit_adxl34x.py b/adafruit_adxl34x.py index ca88c3f..f646358 100755 --- a/adafruit_adxl34x.py +++ b/adafruit_adxl34x.py @@ -389,9 +389,7 @@ def enable_tap_detection( self._write_register_byte(_REG_INT_ENABLE, active_interrupts) self._enabled_interrupts["tap"] = 2 else: - raise ValueError( - "tap_count must be 1 for single tap or 2 for double tap" - ) + raise ValueError("tap_count must be 1 for single tap or 2 for double tap") def disable_tap_detection(self) -> None: """Disable tap detection"""