Skip to content

Commit f3c18ef

Browse files
committed
Fix Pylint issues
1 parent 936ad82 commit f3c18ef

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

examples/gpio/esp32spi_gpio.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
import board
2-
import busio
31
import time
42
import random
3+
import board
54
from digitalio import DigitalInOut, Direction
6-
from analogio import AnalogIn
75
import pulseio
86
from adafruit_esp32spi import adafruit_esp32spi
97

108

11-
"""
12-
ESP32SPI Digital and Analog Pin Reads & Writes
9+
# ESP32SPI Digital and Analog Pin Reads & Writes
1310

14-
This example targets a Feather M4 or ItsyBitsy M4 as the CircuitPython processor,
15-
along with either an ESP32 Feather or ESP32 Breakout as Wi-Fi co-processor.
16-
You may need to choose different pins for other targets.
17-
"""
11+
# This example targets a Feather M4 or ItsyBitsy M4 as the CircuitPython processor,
12+
# along with either an ESP32 Feather or ESP32 Breakout as Wi-Fi co-processor.
13+
# You may need to choose different pins for other targets."""
1814

1915

2016
def esp_reset_all():
@@ -44,6 +40,7 @@ def esp_init_pin_modes(din, dout):
4440
esp.set_pin_mode(dout, 0x1) # Red LED on ESP32 Feather and ESP32 Breakout
4541

4642
def esp_status_text(n):
43+
text = 'WL_UNDEFINED'
4744
t = {0: 'WL_IDLE_STATUS',
4845
1: 'WL_NO_SSID_AVAIL',
4946
2: 'WL_SCAN_COMPLETED',
@@ -54,11 +51,10 @@ def esp_status_text(n):
5451
7: 'WL_AP_LISTENING',
5552
8: 'WL_AP_CONNECTED',
5653
9: 'WL_AP_FAILED',
57-
10: 'WL_NO_SHIELD', }
54+
10: 'WL_NO_SHIELD', }
5855
if n in t:
59-
return t[n]
60-
else:
61-
return 'WL_UNDEFINED'
56+
text = t[n]
57+
return text
6258

6359

6460
# M4 R/W Pin Assignments

0 commit comments

Comments
 (0)