]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
black using python 3.7 style
authorDan Halbert <halbert@halwitz.org>
Tue, 15 Feb 2022 23:00:31 +0000 (18:00 -0500)
committerDan Halbert <halbert@halwitz.org>
Tue, 15 Feb 2022 23:00:31 +0000 (18:00 -0500)
.github/workflows/build.yml
test/src/testing/universal/i2c.py

index 79c25752f014da9e0fd5072dcf1a7c712b2fe2d6..0da2cc6c88f3118d577f90f6bfc9c7fc90122f82 100644 (file)
@@ -40,7 +40,7 @@ jobs:
       run: git describe --dirty --always --tags
     - name: Check formatting
       run: |
-        black --check --target-version=py35 .
+        black --check --target-version=py37 .
     - name: PyLint
       run: |
         pylint $( find src -name '*.py' )
index 184fee4021e80925f3772d56d80de17051486f89..ba74044999b338f73303ac820b0b9bb4c8c5e118 100644 (file)
@@ -66,7 +66,7 @@ class TestMMA8451Interactive(TestCase):
         sensor = adafruit_mma8451.MMA8451(i2c)
 
         x, y, z = sensor.acceleration
-        absolute = math.sqrt(x ** 2 + y ** 2 + z ** 2)
+        absolute = math.sqrt(x**2 + y**2 + z**2)
         self.assertTrue(9 <= absolute <= 11, "Not earth gravity")
 
         orientation = sensor.orientation