]> Repositories - Adafruit_Blinka-hackapet.git/blobdiff - src/adafruit_blinka/microcontroller/generic_agnostic_board/pin.py
pylinten
[Adafruit_Blinka-hackapet.git] / src / adafruit_blinka / microcontroller / generic_agnostic_board / pin.py
index c52775926518aeed1e60e5ac1f3c4f135c55b7ce..47d97545661e59b0c05c2a09905b46565f99a956 100644 (file)
@@ -71,6 +71,8 @@ class Pin:
     PULL_UP = 1
     PULL_DOWN = 2
 
+    # pylint: disable=no-self-use
+
     def return_toggle(self):
         """Returns the pin's expected value, toggling between True and False"""
         toggle_state = not self.previous_value
@@ -150,10 +152,10 @@ class Pin:
         self.current_value = self.pin_behavior.get(self.id)()
 
         # is pin a pull up and pin is LOW?
-        if self._pull == Pin.PULL_UP and self.current_value == False:
+        if self._pull == Pin.PULL_UP and self.current_value is False:
             self.current_value = False
         # is pin a pull down and pin is HIGH?
-        if self._pull == Pin.PULL_DOWN and self.current_value == True:
+        if self._pull == Pin.PULL_DOWN and self.current_value is True:
             self.current_value = False
         return self.current_value