The result of the calculation is an int. A bool should be constructed from the result before being passed back to the caller. (Aside: Doesn't mypy catch this?)
Consequently the adafruit_pcf8575.DigitalInOut.value does not adhere to the digitalio.DigitalInOut interface.
Hi, we actually don't utilize mypy at the moment, so types are not checked within the CI. I agree that it makes sense to return a bool to stay consistent. Are you interested in submitting a PR to fix it?
The implementation of the
adafruit_pcf8575.PCF8575.read_pin()
is:The result of the calculation is an
int
. Abool
should be constructed from the result before being passed back to the caller. (Aside: Doesn'tmypy
catch this?)Consequently the
adafruit_pcf8575.DigitalInOut.value
does not adhere to thedigitalio.DigitalInOut
interface.This also applies to the PCF8574 implementation.