]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Allow latest release of black to run
authorMelissa LeBlanc-Williams <melissa@adafruit.com>
Thu, 10 Sep 2020 23:53:49 +0000 (16:53 -0700)
committerMelissa LeBlanc-Williams <melissa@adafruit.com>
Thu, 10 Sep 2020 23:53:49 +0000 (16:53 -0700)
.github/workflows/build.yml
src/adafruit_blinka/__init__.py
src/busio.py
test/src/testing/adafruit_blinka.py

index b0f79c273442b0faf46272c006a7839c073a3e79..f00cbfe4231e70a782eb36d472f4c7ac4d38e9b4 100644 (file)
@@ -35,7 +35,7 @@ jobs:
         source actions-ci/install.sh
     - name: Pip install pylint, black, & Sphinx
       run: |
-        pip install --force-reinstall pylint black==19.10b0 Sphinx sphinx-rtd-theme
+        pip install --force-reinstall pylint black Sphinx sphinx-rtd-theme
     - name: Library version
       run: git describe --dirty --always --tags
     - name: Check formatting
index 2df8a2d702228cd493a493da985788753c47081c..69e917851be562cef45acbaa934d58b1518be6b5 100755 (executable)
@@ -8,8 +8,8 @@
 
 class Enum:
     """
-        Object supporting CircuitPython-style of static symbols
-        as seen with Direction.OUTPUT, Pull.UP
+    Object supporting CircuitPython-style of static symbols
+    as seen with Direction.OUTPUT, Pull.UP
     """
 
     def __repr__(self):
@@ -27,8 +27,8 @@ class Enum:
     @classmethod
     def iteritems(cls):
         """
-            Inspects attributes of the class for instances of the class
-            and returns as key,value pairs mirroring dict#iteritems
+        Inspects attributes of the class for instances of the class
+        and returns as key,value pairs mirroring dict#iteritems
         """
         for key in dir(cls):
             val = getattr(cls, key)
index d63c815fbefe2b840186572d4fffea61c9881670..1cad051eaedfb50ed3c16217acdc4a4a108a3629 100755 (executable)
@@ -127,7 +127,7 @@ class I2C(Lockable):
         in_end=None,
         stop=False
     ):
-        """"Write to a device at specified address from a buffer then read
+        """ "Write to a device at specified address from a buffer then read
         from a device at specified address into a buffer
         """
         return self._i2c.writeto_then_readfrom(
index 5ad38e21d1d83816ed2263a24da828291a416751..3fcecc34c4f603e97ca8dd4bccb6e30f3c56e243 100644 (file)
@@ -3,8 +3,8 @@ import unittest
 
 class TestEnum(unittest.TestCase):
     """
-        Verifies the repl() and str() behaviour of an example Enum
-        Enums represent configuration values such as digitalio.Direction, digitalio.Pull etc.
+    Verifies the repl() and str() behaviour of an example Enum
+    Enums represent configuration values such as digitalio.Direction, digitalio.Pull etc.
     """
 
     def setUp(self):
@@ -24,7 +24,13 @@ class TestEnum(unittest.TestCase):
     def test_iteritems(self):
         """A subtype of Enum can list all attributes of its own type"""
         items = list(self.Cls.iteritems())
-        self.assertEqual(items, [("one", self.Cls.one), ("two", self.Cls.two),])
+        self.assertEqual(
+            items,
+            [
+                ("one", self.Cls.one),
+                ("two", self.Cls.two),
+            ],
+        )
 
     def test_repr(self):
         """A repr() call on an Enum gives its fully-qualified name"""