Skip to content

Commit 90f5d75

Browse files
committed
remove empty default values. add types of items in lists of args
1 parent 993b21b commit 90f5d75

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

adafruit_matrixkeypad.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
# to have this in a try/except to enable type
3232
try:
3333
from typing import List
34+
from digitalio import DigitalInOut
3435
except ImportError:
3536
pass
3637

@@ -41,7 +42,12 @@
4142
class Matrix_Keypad:
4243
"""Driver for passive matrix keypads - any size"""
4344

44-
def __init__(self, row_pins: List = [], col_pins: List = [], keys:List = []):
45+
def __init__(
46+
self,
47+
row_pins: List[DigitalInOut],
48+
col_pins: List[DigitalInOut],
49+
keys: List[List],
50+
) -> None:
4551
"""
4652
Initialise the driver with the correct size and key list.
4753

0 commit comments

Comments
 (0)