Skip to content

Commit 3ab6ae9

Browse files
committed
pydisplay: Still linting.
Signed-off-by: Brad Barnett <[email protected]>
1 parent 2b5f61a commit 3ab6ae9

File tree

7 files changed

+19
-11
lines changed

7 files changed

+19
-11
lines changed

micropython/pydisplay/displaybuf/displaybuf/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,18 @@
3737
if sys.implementation.name == "micropython":
3838
try:
3939
from viper_tools import _bounce8, _bounce4
40+
4041
_has_viper_tools = True
4142
except Exception:
4243
pass
4344

4445
if not _has_viper_tools:
46+
4547
def _bounce8(*args, **kwargs):
4648
raise NotImplementedError(
4749
".GS8 and .GS4_HMSB DisplayBuffer formats are only implemented in viper_tools.py for MicroPython."
4850
)
51+
4952
_bounce4 = _bounce8
5053

5154

micropython/pydisplay/displaysys/displaysys-fbdisplay/examples/board_config.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,29 +56,34 @@ def send_init_sequence(init_sequence, mosi, sck, cs):
5656
reset = iox.Pin(2, Pin.OUT, value=1)
5757
backlight = iox.Pin(4, Pin.OUT, value=1)
5858

59-
send_init_sequence(init_sequence, mosi=iox.Pin(7, Pin.OUT),
60-
sck=iox.Pin(0, Pin.OUT, value=0), cs=iox.Pin(1, Pin.OUT, value=1))
59+
send_init_sequence(
60+
init_sequence,
61+
mosi=iox.Pin(7, Pin.OUT),
62+
sck=iox.Pin(0, Pin.OUT, value=0),
63+
cs=iox.Pin(1, Pin.OUT, value=1),
64+
)
6165

6266

6367
fb = RGBFrameBuffer(**tft_pins, **tft_timings)
6468
mv = memoryview(fb)
65-
mv[:] = b'\xFF' * len(mv)
69+
mv[:] = b"\xff" * len(mv)
6670
fb.refresh()
6771

68-
touch_drv = FT6x36(i2c, address=0x48) #, irq = iox.Pin(3, Pin.OUT))
72+
touch_drv = FT6x36(i2c, address=0x48) # , irq = iox.Pin(3, Pin.OUT))
73+
6974

7075
def touch_read_func():
7176
touches = touch_drv.touches
7277
if len(touches):
73-
return touches[0]['x'], touches[0]['y']
78+
return touches[0]["x"], touches[0]["y"]
7479
return None
7580

7681

7782
# Typical board_config.py setup from here on out
7883

7984
display_drv = FBDisplay(fb)
8085

81-
touch_rotation_table=(0, 0, 0, 0)
86+
touch_rotation_table = (0, 0, 0, 0)
8287

8388
broker = device.Broker()
8489

micropython/pydisplay/displaysys/displaysys-jndisplay/examples/board_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444
else:
4545
from eventsys import device
4646
import sys
47+
4748
try:
4849
from displaysys.pgdisplay import PGDisplay as DTDisplay, poll
4950
except ImportError:
5051
from displaysys.sdldisplay import SDLDisplay as DTDisplay, poll
5152

52-
5353
display_drv = DTDisplay(
5454
width=width,
5555
height=height,

micropython/pydisplay/displaysys/displaysys-pgdisplay/examples/board_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444
else:
4545
from eventsys import device
4646
import sys
47+
4748
try:
4849
from displaysys.pgdisplay import PGDisplay as DTDisplay, poll
4950
except ImportError:
5051
from displaysys.sdldisplay import SDLDisplay as DTDisplay, poll
5152

52-
5353
display_drv = DTDisplay(
5454
width=width,
5555
height=height,

micropython/pydisplay/displaysys/displaysys-psdisplay/examples/board_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444
else:
4545
from eventsys import device
4646
import sys
47+
4748
try:
4849
from displaysys.pgdisplay import PGDisplay as DTDisplay, poll
4950
except ImportError:
5051
from displaysys.sdldisplay import SDLDisplay as DTDisplay, poll
5152

52-
5353
display_drv = DTDisplay(
5454
width=width,
5555
height=height,

micropython/pydisplay/displaysys/displaysys-sdldisplay/examples/board_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444
else:
4545
from eventsys import device
4646
import sys
47+
4748
try:
4849
from displaysys.pgdisplay import PGDisplay as DTDisplay, poll
4950
except ImportError:
5051
from displaysys.sdldisplay import SDLDisplay as DTDisplay, poll
5152

52-
5353
display_drv = DTDisplay(
5454
width=width,
5555
height=height,

micropython/pydisplay/displaysys/displaysys/displaysys/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
try:
1818
from byteswap import byteswap
1919
except ImportError:
20+
2021
def byteswap(buf):
2122
"""
2223
Swap the bytes of a 16-bit buffer in place with no dependencies.
2324
"""
2425
buf[::2], buf[1::2] = buf[1::2], buf[::2]
2526

2627

27-
2828
gc.collect()
2929

3030

0 commit comments

Comments
 (0)