]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Black formatted
authorMelissa LeBlanc-Williams <melissa@adafruit.com>
Thu, 10 Sep 2020 23:45:11 +0000 (16:45 -0700)
committerMelissa LeBlanc-Williams <melissa@adafruit.com>
Thu, 10 Sep 2020 23:45:11 +0000 (16:45 -0700)
src/adafruit_blinka/__init__.py
src/adafruit_blinka/microcontroller/stm32/stm32mp157/pin.py
src/busio.py
test/src/testing/adafruit_blinka.py

index 2df8a2d702228cd493a493da985788753c47081c..69e917851be562cef45acbaa934d58b1518be6b5 100755 (executable)
@@ -8,8 +8,8 @@
 
 class Enum:
     """
 
 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):
     """
 
     def __repr__(self):
@@ -27,8 +27,8 @@ class Enum:
     @classmethod
     def iteritems(cls):
         """
     @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)
         """
         for key in dir(cls):
             val = getattr(cls, key)
index d5c88109f26b9ebaeb755a015ba0f478faf0b2a2..019698249790627ad7e4fec5441280ab6b66ac0e 100755 (executable)
@@ -145,9 +145,7 @@ PZ6 = Pin((9, 6))
 PZ7 = Pin((9, 7))
 
 # ordered as uartId, txId, rxId
 PZ7 = Pin((9, 7))
 
 # ordered as uartId, txId, rxId
-UART_PORTS = (
-    (3, PB10, PB12),
-)
+UART_PORTS = ((3, PB10, PB12),)
 
 # ordered as i2cId, sclId, sdaId
 I2C_PORTS = (
 
 # ordered as i2cId, sclId, sdaId
 I2C_PORTS = (
index d63c815fbefe2b840186572d4fffea61c9881670..1cad051eaedfb50ed3c16217acdc4a4a108a3629 100755 (executable)
@@ -127,7 +127,7 @@ class I2C(Lockable):
         in_end=None,
         stop=False
     ):
         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(
         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):
     """
 
 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):
     """
 
     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())
     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"""
 
     def test_repr(self):
         """A repr() call on an Enum gives its fully-qualified name"""