]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
blacken
authorbrentru <brent@adafruit.com>
Tue, 2 Apr 2024 20:47:34 +0000 (16:47 -0400)
committerbrentru <brent@adafruit.com>
Tue, 2 Apr 2024 20:47:34 +0000 (16:47 -0400)
src/adafruit_blinka/microcontroller/fake_mcp2221/analogio.py
src/adafruit_blinka/microcontroller/fake_mcp2221/fake_mcp2221.py
src/adafruit_blinka/microcontroller/fake_mcp2221/i2c.py
src/adafruit_blinka/microcontroller/fake_mcp2221/pin.py

index b684763a1d8c3fc17843a5a9e12aacddc93aa518..a70d7fc4a34913aa13dd89dc236246796130a8ab 100644 (file)
@@ -54,4 +54,4 @@ class AnalogOut(ContextManaged):
         self._pin.value(value)
 
     def deinit(self):
         self._pin.value(value)
 
     def deinit(self):
-        del self._pin
\ No newline at end of file
+        del self._pin
index 39e01de7eefddc118d6fc16dc05e2791de45a327..7a75dec3e229d855a73502b3d153ce9da93aadd7 100644 (file)
@@ -14,7 +14,7 @@ class MCP2221:
     """MCP2221 Device Class Definition"""
 
     def __init__(self):
     """MCP2221 Device Class Definition"""
 
     def __init__(self):
-        pass # This is a "fake" implementation
+        pass  # This is a "fake" implementation
 
     def close(self):
         """Close the hid device. Does nothing if the device is not open."""
 
     def close(self):
         """Close the hid device. Does nothing if the device is not open."""
@@ -24,7 +24,6 @@ class MCP2221:
         # try to close the device before destroying the instance
         pass
 
         # try to close the device before destroying the instance
         pass
 
-
     def _hid_xfer(self, report, response=True):
         """Perform HID Transfer"""
         return None
     def _hid_xfer(self, report, response=True):
         """Perform HID Transfer"""
         return None
@@ -67,7 +66,6 @@ class MCP2221:
         """Get Current GPIO Pin Value"""
         pass
 
         """Get Current GPIO Pin Value"""
         pass
 
-
     # ----------------------------------------------------------------
     # I2C
     # ----------------------------------------------------------------
     # ----------------------------------------------------------------
     # I2C
     # ----------------------------------------------------------------
@@ -120,7 +118,6 @@ class MCP2221:
         """Perform an I2C Device Scan"""
         pass
 
         """Perform an I2C Device Scan"""
         pass
 
-
     # ----------------------------------------------------------------
     # ADC
     # ----------------------------------------------------------------
     # ----------------------------------------------------------------
     # ADC
     # ----------------------------------------------------------------
@@ -147,4 +144,4 @@ class MCP2221:
     # pylint: enable=unused-argument
 
 
     # pylint: enable=unused-argument
 
 
-mcp2221 = MCP2221()
\ No newline at end of file
+mcp2221 = MCP2221()
index 5f280513fcb7bf00afe1551e608efdb12ef8e34b..b98c70c2255016e5183cb78230c6110790b08084 100644 (file)
@@ -12,7 +12,7 @@ class I2C:
     def __init__(self, *, frequency=100000):
         self._mcp2221 = mcp2221
 
     def __init__(self, *, frequency=100000):
         self._mcp2221 = mcp2221
 
-    def scan(self, address_list = None):
+    def scan(self, address_list=None):
         """Mocks an I2C scan.
         If address_list is not provided, this function returns a list of 3 randomly generated I2C addresses from 0x0 to 0x79.
         For a stimulus-driven test: If address_list is provided, this function returns the provided address_list.
         """Mocks an I2C scan.
         If address_list is not provided, this function returns a list of 3 randomly generated I2C addresses from 0x0 to 0x79.
         For a stimulus-driven test: If address_list is provided, this function returns the provided address_list.
@@ -51,4 +51,4 @@ class I2C:
         """
         pass
 
         """
         pass
 
-    # pylint: enable=unused-argument
\ No newline at end of file
+    # pylint: enable=unused-argument
index 27a1c562e6bfa77daeb991e1fb16cfdc028df147..f4e1b94ad312a6e65ada65a91472cf16c89c8815 100644 (file)
@@ -28,7 +28,9 @@ class Pin:
         if self.id is None:
             raise RuntimeError("Can not init a None type pin.")
         if pull is not None:
         if self.id is None:
             raise RuntimeError("Can not init a None type pin.")
         if pull is not None:
-            raise NotImplementedError("Internal pullups and pulldowns not supported on the MCP2221")
+            raise NotImplementedError(
+                "Internal pullups and pulldowns not supported on the MCP2221"
+            )
         if mode in (Pin.IN, Pin.OUT):
             # All pins can do GPIO
             pass
         if mode in (Pin.IN, Pin.OUT):
             # All pins can do GPIO
             pass
@@ -90,4 +92,4 @@ G2 = Pin(2)
 G3 = Pin(3)
 
 SCL = Pin()
 G3 = Pin(3)
 
 SCL = Pin()
-SDA = Pin()
\ No newline at end of file
+SDA = Pin()