Skip to content

Commit ec1b921

Browse files
committed
Post pre-commit
Changes from black
1 parent a39d006 commit ec1b921

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

adafruit_74hc595.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import adafruit_bus_device.spi_device as spi_device
3030

3131

32-
3332
__version__ = "0.0.0-auto.0"
3433
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_74HC595.git"
3534

@@ -41,7 +40,11 @@ class DigitalInOut:
4140
direction as input will raise an exception.
4241
"""
4342

44-
def __init__(self, pin_number: 'microcontroller.Pin', shift_register_74hc595: 'ShiftRegister74HC595'):
43+
def __init__(
44+
self,
45+
pin_number: "microcontroller.Pin",
46+
shift_register_74hc595: "ShiftRegister74HC595",
47+
):
4548
"""Specify the pin number of the shift register (0...7) and
4649
ShiftRegister74HC595 instance.
4750
"""
@@ -115,7 +118,12 @@ class ShiftRegister74HC595:
115118
and indicate the number of shift registers being used
116119
"""
117120

118-
def __init__(self, spi: 'busio.I2C', latch: digitalio.DigitalInOut, number_of_shift_registers: int = 1):
121+
def __init__(
122+
self,
123+
spi: "busio.I2C",
124+
latch: digitalio.DigitalInOut,
125+
number_of_shift_registers: int = 1,
126+
):
119127
self._device = spi_device.SPIDevice(spi, latch, baudrate=1000000)
120128
self._number_of_shift_registers = number_of_shift_registers
121129
self._gpio = bytearray(self._number_of_shift_registers)
@@ -133,14 +141,14 @@ def gpio(self):
133141
return self._gpio
134142

135143
@gpio.setter
136-
def gpio(self, val: '_typing.ReadableBuffer'):
144+
def gpio(self, val: "_typing.ReadableBuffer"):
137145
self._gpio = val
138146

139147
with self._device as spi:
140148
# pylint: disable=no-member
141149
spi.write(self._gpio)
142150

143-
def get_pin(self, pin: int) -> 'microcontroller.Pin':
151+
def get_pin(self, pin: int) -> "microcontroller.Pin":
144152
"""Convenience function to create an instance of the DigitalInOut class
145153
pointing at the specified pin of this 74HC595 device .
146154
"""

0 commit comments

Comments
 (0)