From 2bb509c5e122b4e0538bd5a87364c3c5a524fc0c Mon Sep 17 00:00:00 2001 From: brentru Date: Tue, 2 Apr 2024 16:47:34 -0400 Subject: [PATCH] blacken --- .../microcontroller/fake_mcp2221/analogio.py | 2 +- .../microcontroller/fake_mcp2221/fake_mcp2221.py | 7 ++----- src/adafruit_blinka/microcontroller/fake_mcp2221/i2c.py | 4 ++-- src/adafruit_blinka/microcontroller/fake_mcp2221/pin.py | 6 ++++-- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/adafruit_blinka/microcontroller/fake_mcp2221/analogio.py b/src/adafruit_blinka/microcontroller/fake_mcp2221/analogio.py index b684763..a70d7fc 100644 --- a/src/adafruit_blinka/microcontroller/fake_mcp2221/analogio.py +++ b/src/adafruit_blinka/microcontroller/fake_mcp2221/analogio.py @@ -54,4 +54,4 @@ class AnalogOut(ContextManaged): self._pin.value(value) def deinit(self): - del self._pin \ No newline at end of file + del self._pin diff --git a/src/adafruit_blinka/microcontroller/fake_mcp2221/fake_mcp2221.py b/src/adafruit_blinka/microcontroller/fake_mcp2221/fake_mcp2221.py index 39e01de..7a75dec 100644 --- a/src/adafruit_blinka/microcontroller/fake_mcp2221/fake_mcp2221.py +++ b/src/adafruit_blinka/microcontroller/fake_mcp2221/fake_mcp2221.py @@ -14,7 +14,7 @@ class MCP2221: """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.""" @@ -24,7 +24,6 @@ class MCP2221: # try to close the device before destroying the instance pass - def _hid_xfer(self, report, response=True): """Perform HID Transfer""" return None @@ -67,7 +66,6 @@ class MCP2221: """Get Current GPIO Pin Value""" pass - # ---------------------------------------------------------------- # I2C # ---------------------------------------------------------------- @@ -120,7 +118,6 @@ class MCP2221: """Perform an I2C Device Scan""" pass - # ---------------------------------------------------------------- # ADC # ---------------------------------------------------------------- @@ -147,4 +144,4 @@ class MCP2221: # pylint: enable=unused-argument -mcp2221 = MCP2221() \ No newline at end of file +mcp2221 = MCP2221() diff --git a/src/adafruit_blinka/microcontroller/fake_mcp2221/i2c.py b/src/adafruit_blinka/microcontroller/fake_mcp2221/i2c.py index 5f28051..b98c70c 100644 --- a/src/adafruit_blinka/microcontroller/fake_mcp2221/i2c.py +++ b/src/adafruit_blinka/microcontroller/fake_mcp2221/i2c.py @@ -12,7 +12,7 @@ class I2C: 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. @@ -51,4 +51,4 @@ class I2C: """ pass - # pylint: enable=unused-argument \ No newline at end of file + # pylint: enable=unused-argument diff --git a/src/adafruit_blinka/microcontroller/fake_mcp2221/pin.py b/src/adafruit_blinka/microcontroller/fake_mcp2221/pin.py index 27a1c56..f4e1b94 100644 --- a/src/adafruit_blinka/microcontroller/fake_mcp2221/pin.py +++ b/src/adafruit_blinka/microcontroller/fake_mcp2221/pin.py @@ -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: - 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 @@ -90,4 +92,4 @@ G2 = Pin(2) G3 = Pin(3) SCL = Pin() -SDA = Pin() \ No newline at end of file +SDA = Pin() -- 2.49.0