Skip to content

Commit a3815ac

Browse files
committed
Add Missing Type Annotations
1 parent 7875aa6 commit a3815ac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_veml6075.py

Lines changed: 3 additions & 3 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 Union
37+
from typing import Union # pylint: disable=unused-import
3838
from busio import I2C
3939
except ImportError:
4040
pass
@@ -102,7 +102,7 @@ def __init__(
102102
# read ID!
103103
veml_id = self._read_register(_REV_ID)
104104
if veml_id != 0x26:
105-
raise RuntimeError(f"Incorrect VEML6075 ID {hex(veml_id)}")
105+
raise RuntimeError(f"Incorrect VEML6075 ID {hex(veml_id).upper()}")
106106

107107
# shut down
108108
self._write_register(_REG_CONF, 0x01)
@@ -150,7 +150,7 @@ def uv_index(self) -> float:
150150
return ((self._uvacalc * self._uvaresp) + (self._uvbcalc * self._uvbresp)) / 2
151151

152152
@property
153-
def integration_time(self) -> Union[None, int]:
153+
def integration_time(self) -> int:
154154
"""The amount of time the VEML is sampling data for, in millis.
155155
Valid times are 50, 100, 200, 400 or 800ms"""
156156
key = (self._read_register(_REG_CONF) >> 4) & 0x7

0 commit comments

Comments
 (0)