Skip to content

Commit 0ee2885

Browse files
committed
black and pylint
1 parent 841c87c commit 0ee2885

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

adafruit_featherwing/tft_featherwing_24.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
import sdcardio
4545
import storage
4646

47-
47+
# pylint: disable-msg=too-few-public-methods
4848
class TFTFeatherWing24:
4949
"""Class representing an `TFT FeatherWing 2.4
5050
<https://www.adafruit.com/product/3315>`_.
@@ -63,9 +63,7 @@ def __init__(self, spi=None, cs=None, dc=None):
6363
ts_cs = digitalio.DigitalInOut(board.D6)
6464
self.touchscreen = Adafruit_STMPE610_SPI(spi, ts_cs)
6565

66-
display_bus = displayio.FourWire(
67-
spi, command=dc, chip_select=cs
68-
)
66+
display_bus = displayio.FourWire(spi, command=dc, chip_select=cs)
6967
self.display = adafruit_ili9341.ILI9341(display_bus, width=320, height=240)
7068

7169
sd_cs = board.D5

examples/featherwing_tft24_simpletest.py

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1-
import board
1+
"""
2+
This example will display a CircuitPython console and
3+
print the coordinates of touchscreen presses.
4+
5+
It will also try to write and then read a file on the
6+
SD Card.
7+
"""
28
from adafruit_featherwing import tft_featherwing_24
39

410
tft_featherwing = tft_featherwing_24.TFTFeatherWing24()
511

6-
f = open("/sd/tft_featherwing.txt", "w")
7-
f.write("Blinka\nTFT 2.4\" FeatherWing")
8-
f.close()
12+
try:
13+
f = open("/sd/tft_featherwing.txt", "w")
14+
f.write("Blinka\nBlackberry Q10 Keyboard")
15+
f.close()
16+
17+
f = open("/sd/tft_featherwing.txt", "r")
18+
print(f.read())
19+
f.close()
20+
except OSError as error:
21+
print("Unable to write to SD Card.")
922

10-
f = open("/sd/tft_featherwing.txt", "r")
11-
print(f.read())
12-
f.close()
1323

1424
while True:
1525
if not tft_featherwing.touchscreen.buffer_empty:

0 commit comments

Comments
 (0)