Skip to content

Commit 7390c76

Browse files
committed
Modified for black and pylint
1 parent b1dc072 commit 7390c76

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

src/adafruit_blinka/board/horizon/rdkx3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@
5151
D24 = pin.D24
5252
D25 = pin.D25
5353
D26 = pin.D26
54-
D27 = pin.D27
54+
D27 = pin.D27

src/adafruit_blinka/microcontroller/horizon/pwmio/PWMOut.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
#
33
# SPDX-License-Identifier: MIT
44
"""Custom PWMOut Wrapper for Hobot.GPIO PWM Class"""
5-
import Hobot.GPIO as GPIO
5+
from Hobot import GPIO
66

77
GPIO.setmode(GPIO.BCM) # Use BCM pins D4 = GPIO #4
88
GPIO.setwarnings(False) # shh!
99
GPIO.cleanup()
1010

11+
1112
# pylint: disable=unnecessary-pass
1213
class PWMError(IOError):
1314
"""Base class for PWM errors."""
@@ -36,17 +37,15 @@ def __exit__(self, t, value, traceback):
3637
self.deinit()
3738

3839
def _open(self, pin, duty=0, freq=500, variable_frequency=False):
39-
if (pin == (0, 25)):
40+
if pin == (0, 25):
4041
gpio_pin = 12
41-
elif (pin == (0, 4)):
42+
elif pin == (0, 4):
4243
gpio_pin = 13
4344
else:
44-
raise ValueError(
45-
"PWM is only available on D12 or D13."
46-
)
45+
raise ValueError("PWM is only available on D12 or D13.")
4746
self._pin = gpio_pin
4847
GPIO.setmode(GPIO.BCM)
49-
# GPIO.setup(self._pin, GPIO.OUT)
48+
# GPIO.setup(self._pin, GPIO.OUT)
5049
self._pwmpin = GPIO.PWM(self._pin, freq)
5150

5251
if variable_frequency:

src/adafruit_blinka/microcontroller/horizon/sunrise_x3/pin.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,11 @@
4343
TXD = D14
4444
RXD = D15
4545

46-
spiPorts = (
47-
(1, SCLK, MOSI, MISO),
48-
)
46+
spiPorts = ((1, SCLK, MOSI, MISO),)
4947

5048
uartPorts = ((0, TXD, RXD),)
5149

52-
i2cPorts = (
53-
(0, SCL, SDA),
54-
)
50+
i2cPorts = ((0, SCL, SDA),)
5551

5652
pwmOuts = (
5753
((0, 0), D12),

0 commit comments

Comments
 (0)