Skip to content

Commit 3d15d80

Browse files
committed
pylinten
1 parent 6002627 commit 3d15d80

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

examples/generic_aio.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
# SPDX-FileCopyrightText: 2024 Brent Rubell for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
14
import pytest
25
import board
36
import analogio
47

58
# Analog Outputs
6-
7-
89
def test_Ax_OUTPUT():
910
"""Test analog output pin functionality."""
1011
assert board.board_id == "GENERIC_AGNOSTIC_BOARD"

examples/generic_dio.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: 2024 Brent Rubell for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
14
import pytest
25
import board
36
import digitalio

examples/generic_i2c.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
# SPDX-FileCopyrightText: 2024 Brent Rubell for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
14
import pytest
25
import busio
36
from board import *
47

5-
68
def test_i2c_scan_random():
79
i2c = busio.I2C(SCL, SDA)
810
i2c.try_lock()

src/adafruit_blinka/microcontroller/generic_agnostic_board/pin.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ class Pin:
7171
PULL_UP = 1
7272
PULL_DOWN = 2
7373

74+
# pylint: disable=no-self-use
75+
7476
def return_toggle(self):
7577
"""Returns the pin's expected value, toggling between True and False"""
7678
toggle_state = not self.previous_value
@@ -150,10 +152,10 @@ def read(self):
150152
self.current_value = self.pin_behavior.get(self.id)()
151153

152154
# is pin a pull up and pin is LOW?
153-
if self._pull == Pin.PULL_UP and self.current_value == False:
155+
if self._pull == Pin.PULL_UP and self.current_value is False:
154156
self.current_value = False
155157
# is pin a pull down and pin is HIGH?
156-
if self._pull == Pin.PULL_DOWN and self.current_value == True:
158+
if self._pull == Pin.PULL_DOWN and self.current_value is True:
157159
self.current_value = False
158160
return self.current_value
159161

0 commit comments

Comments
 (0)