Skip to content

Commit 0f1ede6

Browse files
committed
Linted
1 parent 503e257 commit 0f1ede6

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

examples/featherwing_keyboard_featherwing.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@
2020
kbd_featherwing.neopixel[0] = 0x002244
2121

2222
try:
23-
f = open("/sd/tft_featherwing.txt", "w")
23+
f = open( # pylint: disable=unspecified-encoding,consider-using-with
24+
"/sd/tft_featherwing.txt", "w"
25+
)
2426
f.write("Blinka\nBlackberry Q10 Keyboard")
2527
f.close()
2628

27-
f = open("/sd/tft_featherwing.txt", "r")
29+
f = open( # pylint: disable=unspecified-encoding,consider-using-with
30+
"/sd/tft_featherwing.txt", "r"
31+
)
2832
print(f.read())
2933
f.close()
3034
except OSError as error:

examples/featherwing_tft24_simpletest.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@
1313
tft_featherwing = tft_featherwing_24.TFTFeatherWing24()
1414

1515
try:
16-
f = open("/sd/tft_featherwing.txt", "w")
16+
f = open( # pylint: disable=unspecified-encoding,consider-using-with
17+
"/sd/tft_featherwing.txt", "w"
18+
)
1719
f.write("Blinka\nBlackberry Q10 Keyboard")
1820
f.close()
1921

20-
f = open("/sd/tft_featherwing.txt", "r")
22+
f = open( # pylint: disable=unspecified-encoding,consider-using-with
23+
"/sd/tft_featherwing.txt", "r"
24+
)
2125
print(f.read())
2226
f.close()
2327
except OSError as error:

examples/featherwing_tft35_simpletest.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@
1313
tft_featherwing = tft_featherwing_35.TFTFeatherWing35()
1414

1515
try:
16-
f = open("/sd/tft_featherwing.txt", "w")
16+
f = open( # pylint: disable=unspecified-encoding,consider-using-with
17+
"/sd/tft_featherwing.txt", "w"
18+
)
1719
f.write("Blinka\nBlackberry Q10 Keyboard")
1820
f.close()
1921

20-
f = open("/sd/tft_featherwing.txt", "r")
22+
f = open( # pylint: disable=unspecified-encoding,consider-using-with
23+
"/sd/tft_featherwing.txt", "r"
24+
)
2125
print(f.read())
2226
f.close()
2327
except OSError as error:

0 commit comments

Comments
 (0)