Skip to content

Commit 812b313

Browse files
committed
fix linter issues
1 parent 9914cd5 commit 812b313

File tree

5 files changed

+5
-19
lines changed

5 files changed

+5
-19
lines changed

l293d/config.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

4+
45
class Config(object):
56
__verbose = True
67
__test_mode = False
@@ -33,10 +34,6 @@ def __setattr__(cls, attr, value):
3334
raise AttributeError(
3435
"object '{}' has no attribute '{}'".format(
3536
cls.__name__, attr))
36-
else:
37-
# Now that the set_ method has done it's checks, we can use super()
38-
# to actually set the value.
39-
super(ConfigMeta, cls).__setattr__(attr, value)
4037

4138
@classmethod
4239
def set_verbose(cls, value):

l293d/driver.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
threading = False
1414
from time import sleep
1515

16+
from l293d.gpio import GPIO
1617
from l293d.config import Config
1718
Config = Config()
1819

@@ -29,9 +30,6 @@ def v_print(string):
2930
return False
3031

3132

32-
# Import GPIO
33-
from l293d.gpio import GPIO
34-
3533
GPIO.setwarnings(False)
3634

3735
# Set GPIO mode
@@ -236,4 +234,3 @@ def cleanup():
236234
v_print('GPIO cleanup successful.')
237235
except Exception:
238236
v_print('GPIO cleanup failed.')
239-

l293d/gpio/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from l293d.driver import v_print
2-
31
raspberry_pi, micropython = True, True
42

53
try:
@@ -14,7 +12,7 @@
1412
micropython = False
1513

1614
if not raspberry_pi and not micropython:
17-
v_print(
15+
print(
1816
"Can't import a GPIO controller; test mode has been enabled:\n"
1917
"http://l293d.rtfd.io/en/latest/user-guide/configuration/#test-mode")
2018
from l293d.gpio.testgpio import GPIO

l293d/gpio/micropython.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11

22
import machine
33

4-
from l293d.driver import v_print
5-
64

75
class GPIO(object):
86
__pins = {}
@@ -30,7 +28,7 @@ def stop(self):
3028
@classmethod
3129
def PWM(cls, pin, freq):
3230
return cls.PwmObject(cls.__pins[pin], freq)
33-
31+
3432
@classmethod
3533
def setwarnings(cls, warn):
3634
pass
@@ -46,4 +44,3 @@ def setup(cls, pin_num, mode):
4644
@classmethod
4745
def output(cls, pin_num, mode):
4846
cls.__pins[pin_num].value(mode)
49-

l293d/gpio/testgpio.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11

2-
from l293d.driver import v_print
3-
42

53
class GPIO(object):
64
__pins = {}
@@ -22,7 +20,7 @@ def start(self, duty):
2220

2321
def stop(self):
2422
pass
25-
23+
2624
@classmethod
2725
def setwarnings(cls, warn):
2826
pass
@@ -38,4 +36,3 @@ def setup(cls, pin_num, mode):
3836
@classmethod
3937
def output(cls, pin_num, mode):
4038
pass
41-

0 commit comments

Comments
 (0)