Skip to content

Commit 609e947

Browse files
authored
Merge pull request #9 from FoamyGuy/value_return_bool
comparison instead of bool function
2 parents eba437a + 07e7807 commit 609e947

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_pcf8575.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def read_pin(self, pin: int) -> bool:
104104
:param int pin: The pin number
105105
"""
106106

107-
return bool((self.read_gpio() >> pin) & 0x1)
107+
return ((self.read_gpio() >> pin) & 0x1) == 1
108108

109109

110110
"""

0 commit comments

Comments
 (0)