Skip to content

Commit a21d865

Browse files
committed
blacken
1 parent 9a5ea08 commit a21d865

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

adafruit_neokey/neokey1x4.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
__version__ = "0.0.0-auto.0"
3030
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_NeoKey.git"
3131

32-
from time import sleep
3332
from micropython import const
3433
from adafruit_seesaw.neopixel import NeoPixel
3534
from adafruit_seesaw.seesaw import Seesaw
@@ -42,19 +41,21 @@
4241
_NEOKEY1X4_NUM_COLS = const(4)
4342
_NEOKEY1X4_NUM_KEYS = const(4)
4443

44+
4545
class NeoKey1x4(Seesaw):
4646
"""Driver for the Adafruit NeoKey 1x4."""
4747

4848
def __init__(self, i2c_bus, interrupt=False, addr=_NEOKEY1X4_ADDR):
4949
super().__init__(i2c_bus, addr)
5050
self.interrupt_enabled = interrupt
51-
self.pixels = NeoPixel(self, _NEOKEY1X4_NEOPIX_PIN,
52-
_NEOKEY1X4_NUM_KEYS, brightness=0.2)
51+
self.pixels = NeoPixel(
52+
self, _NEOKEY1X4_NEOPIX_PIN, _NEOKEY1X4_NUM_KEYS, brightness=0.2
53+
)
5354
# set the pins to inputs, pullups
5455
for b in range(4, 8):
5556
self.pin_mode(b, self.INPUT_PULLUP)
5657

5758
def __getitem__(self, index):
5859
if not isinstance(index, int) or (index < 0) or (index > 3):
5960
raise RuntimeError("Index must be 0 thru 3")
60-
return not self.digital_read(index+4)
61+
return not self.digital_read(index + 4)

examples/neokey1x4_simpletest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
22
# SPDX-License-Identifier: MIT
33

4-
import time
54
import board
6-
import busio
75
from adafruit_neokey.neokey1x4 import NeoKey1x4
86

97
# use default I2C bus

0 commit comments

Comments
 (0)