Skip to content

Commit 3e5e091

Browse files
committed
Add missing type annotations
1 parent f8c07a0 commit 3e5e091

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_tsl2561.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from micropython import const
3535

3636
try:
37-
from typing import Optional, Tuple
37+
from typing import Optional, Tuple, Union
3838
from busio import I2C
3939
except ImportError:
4040
pass
@@ -259,7 +259,7 @@ def _enable(self) -> None:
259259
def _disable(self) -> None:
260260
self._write_control_register(_CONTROL_POWEROFF)
261261

262-
def _read_register(self, reg: int, count: int = 1) -> Tuple[int, Tuple[int, int]]:
262+
def _read_register(self, reg: int, count: int = 1) -> Union[int, Tuple[int, int]]:
263263
if count not in (1, 2):
264264
raise RuntimeError("Can only read up to 2 consecutive registers")
265265
self.buf[0] = _COMMAND_BIT | reg

0 commit comments

Comments
 (0)