Closed tylercrumpton closed 2 years ago
Ack, too much TypeScript in my brain. Let me fix those Union types.
I had to remove the variable type hints because mpy-cross
didn't seem to like those. That means these errors will still pop up for mypy:
adafruit_dht.py:204: error: Incompatible types in assignment (expression has type "float", variable has type "int")
adafruit_dht.py:234: error: Incompatible types in assignment (expression has type "float", variable has type "int")
adafruit_dht.py:237: error: Incompatible types in assignment (expression has type "float", variable has type "int")
adafruit_dht.py:255: error: Incompatible types in assignment (expression has type "int", variable has type "None")
adafruit_dht.py:256: error: Incompatible types in assignment (expression has type "int", variable has type "None")
Hiya! I've added type hints for this (fixes #74 ).
These changes clear all of the errors returned from
mypy adafruit_dht.py --disallow-untyped-defs
except for one:I'd fix that one up as well, but I'm not actually sure what is causing it.
Thanks!