Skip to content

Commit 512699c

Browse files
committed
black and lint
1 parent 958875e commit 512699c

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

examples/buttons_example.py

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
import time
99
import board
1010
import displayio
11+
import terminalio
1112
from adafruit_hx8357 import HX8357
1213
from adafruit_button import Button
1314
import adafruit_ft5336
14-
import terminalio
1515

1616
displayio.release_displays()
1717

@@ -39,20 +39,26 @@
3939
BLUE = (0, 0, 255)
4040

4141
spots = [
42-
{'label': "1", 'pos': (10, 10), 'color': RED},
43-
{'label': "2", 'pos': (165, 10), 'color': YELLOW},
44-
{'label': "3", 'pos': (10, 245), 'color': GREEN},
45-
{'label': "4", 'pos': (165, 245), 'color': BLUE},
46-
]
42+
{"label": "1", "pos": (10, 10), "color": RED},
43+
{"label": "2", "pos": (165, 10), "color": YELLOW},
44+
{"label": "3", "pos": (10, 245), "color": GREEN},
45+
{"label": "4", "pos": (165, 245), "color": BLUE},
46+
]
4747

4848
buttons = []
4949
for spot in spots:
50-
button = Button(x=spot['pos'][0], y=spot['pos'][1],
51-
width=145, height=225,
52-
style=Button.ROUNDRECT,
53-
fill_color=spot['color'], outline_color=0xFFFFFF,
54-
label=spot['label'], label_font=terminalio.FONT,
55-
label_color=0x000000)
50+
button = Button(
51+
x=spot["pos"][0],
52+
y=spot["pos"][1],
53+
width=145,
54+
height=225,
55+
style=Button.ROUNDRECT,
56+
fill_color=spot["color"],
57+
outline_color=0xFFFFFF,
58+
label=spot["label"],
59+
label_font=terminalio.FONT,
60+
label_color=0x000000,
61+
)
5662
splash.append(button)
5763
buttons.append(button)
5864

0 commit comments

Comments
 (0)