Skip to content

Commit 0d04760

Browse files
committed
Add Missing type annotations
1 parent 7a539f8 commit 0d04760

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

adafruit_tca8418.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
try:
3737
from typing import Optional, Union
38+
from typing_extensions import Literal
3839
from busio import I2C
3940
except ImportError:
4041
pass
@@ -354,7 +355,7 @@ def direction(self, val: digitalio.Direction) -> None:
354355
self._dir = val
355356

356357
@property
357-
def pull(self) -> Union[None, int]:
358+
def pull(self) -> Union[None, Literal[digitalio.Pull.UP]]:
358359
"""The pull setting for the digital IO, either `digitalio.Pull.UP`
359360
for pull up, or ``None`` for no pull up
360361
"""
@@ -364,7 +365,7 @@ def pull(self) -> Union[None, int]:
364365
return None
365366

366367
@pull.setter
367-
def pull(self, val: Optional[int]):
368+
def pull(self, val: Optional[digitalio.Pull.UP]):
368369
if val is digitalio.Pull.UP:
369370
# for inputs, turn on the pullup (write high)
370371
self._tca.pullup[self._pin] = True

0 commit comments

Comments
 (0)