Skip to content

Commit 8a7026c

Browse files
committed
remove usage of keys()
1 parent 7f0d2e0 commit 8a7026c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

TFT_Spirit_Board/esp32s3_s2_tft_featherwing_480x320/spirit_board.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def write_message(self, message, skip_spaces=True, step_size=6, delay=0.02):
272272
# loop over each character in the word
273273
for character in word:
274274
# if the character is in our locations mapping
275-
if character in SpiritBoard.LOCATIONS.keys():
275+
if character in SpiritBoard.LOCATIONS:
276276
# slide the planchette to the current characters location
277277
self.slide_planchette(SpiritBoard.LOCATIONS[character],
278278
delay=delay, step_size=step_size)

TFT_Spirit_Board/pyportal/spirit_board.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def write_message(self, message, skip_spaces=True, step_size=6, delay=0.02):
272272
# loop over each character in the word
273273
for character in word:
274274
# if the character is in our locations mapping
275-
if character in SpiritBoard.LOCATIONS.keys():
275+
if character in SpiritBoard.LOCATIONS:
276276
# slide the planchette to the current characters location
277277
self.slide_planchette(SpiritBoard.LOCATIONS[character],
278278
delay=delay, step_size=step_size)

TFT_Spirit_Board/pyportal_titano/spirit_board.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def write_message(self, message, skip_spaces=True, step_size=6, delay=0.02):
272272
# loop over each character in the word
273273
for character in word:
274274
# if the character is in our locations mapping
275-
if character in SpiritBoard.LOCATIONS.keys():
275+
if character in SpiritBoard.LOCATIONS:
276276
# slide the planchette to the current characters location
277277
self.slide_planchette(SpiritBoard.LOCATIONS[character],
278278
delay=delay, step_size=step_size)

0 commit comments

Comments
 (0)