Skip to content

Commit 9e6eda9

Browse files
authored
Merge pull request #15 from adafruit/linting
Changed iterator name to get around duplicate-code check
2 parents 2950218 + 58e8002 commit 9e6eda9

8 files changed

+0
-192
lines changed

adafruit_boardtest/boardtest_gpio.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -125,27 +125,3 @@ def run_test(pins):
125125
# Else (no pins found)
126126
print("No GPIO pins found")
127127
return NA, []
128-
129-
130-
def _main():
131-
132-
# List out all the pins available to us
133-
pins = list(dir(board))
134-
print()
135-
print("All pins found:", end=" ")
136-
137-
# Print pins
138-
for pin in pins:
139-
print(pin, end=" ")
140-
print("\n")
141-
142-
# Run test
143-
result = run_test(pins)
144-
print()
145-
print(result[0])
146-
print("Pins tested: " + str(result[1]))
147-
148-
149-
# Execute only if run as main.py or code.py
150-
if __name__ == "__main__":
151-
_main()

adafruit_boardtest/boardtest_i2c.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -175,27 +175,3 @@ def run_test(pins, sda_pin=SDA_PIN_NAME, scl_pin=SCL_PIN_NAME):
175175
# Else (no pins found)
176176
print("No I2C pins found")
177177
return NA, []
178-
179-
180-
def _main():
181-
182-
# List out all the pins available to us
183-
pins = list(dir(board))
184-
print()
185-
print("All pins found:", end=" ")
186-
187-
# Print pins
188-
for pin in pins:
189-
print(pin, end=" ")
190-
print("\n")
191-
192-
# Run test
193-
result = run_test(pins)
194-
print()
195-
print(result[0])
196-
print("Pins tested: " + str(result[1]))
197-
198-
199-
# Execute only if run as main.py or code.py
200-
if __name__ == "__main__":
201-
_main()

adafruit_boardtest/boardtest_led.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -109,27 +109,3 @@ def run_test(pins):
109109
# Else (no pins found)
110110
print("No LED pins found")
111111
return NA, []
112-
113-
114-
def _main():
115-
116-
# List out all the pins available to us
117-
pins = list(dir(board))
118-
print()
119-
print("All pins found:", end=" ")
120-
121-
# Print pins
122-
for pin in pins:
123-
print(pin, end=" ")
124-
print("\n")
125-
126-
# Run test
127-
result = run_test(pins)
128-
print()
129-
print(result[0])
130-
print("Pins tested: " + str(result[1]))
131-
132-
133-
# Execute only if run as main.py or code.py
134-
if __name__ == "__main__":
135-
_main()

adafruit_boardtest/boardtest_sd.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -146,27 +146,3 @@ def run_test(
146146
# Else (no pins found)
147147
print("No SD card pins found")
148148
return NA, []
149-
150-
151-
def _main():
152-
153-
# List out all the pins available to us
154-
pins = list(dir(board))
155-
print()
156-
print("All pins found:", end=" ")
157-
158-
# Print pins
159-
for pin in pins:
160-
print(pin, end=" ")
161-
print("\n")
162-
163-
# Run test
164-
result = run_test(pins)
165-
print()
166-
print(result[0])
167-
print("Pins tested: " + str(result[1]))
168-
169-
170-
# Execute only if run as main.py or code.py
171-
if __name__ == "__main__":
172-
_main()

adafruit_boardtest/boardtest_sd_cd.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -86,27 +86,3 @@ def run_test(pins, cd_pin=SD_CD_PIN_NAME):
8686
# Else (no pins found)
8787
print("No CD pin found")
8888
return NA, []
89-
90-
91-
def _main():
92-
93-
# List out all the pins available to us
94-
pins = list(dir(board))
95-
print()
96-
print("All pins found:", end=" ")
97-
98-
# Print pins
99-
for pin in pins:
100-
print(pin, end=" ")
101-
print("\n")
102-
103-
# Run test
104-
result = run_test(pins)
105-
print()
106-
print(result[0])
107-
print("Pins tested: " + str(result[1]))
108-
109-
110-
# Execute only if run as main.py or code.py
111-
if __name__ == "__main__":
112-
_main()

adafruit_boardtest/boardtest_spi.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -222,27 +222,3 @@ def run_test(
222222
# Else (no pins found)
223223
print("No SPI pins found")
224224
return NA, []
225-
226-
227-
def _main():
228-
229-
# List out all the pins available to us
230-
pins = list(dir(board))
231-
print()
232-
print("All pins found:", end=" ")
233-
234-
# Print pins
235-
for pin in pins:
236-
print(pin, end=" ")
237-
print("\n")
238-
239-
# Run test
240-
result = run_test(pins)
241-
print()
242-
print(result[0])
243-
print("Pins tested: " + str(result[1]))
244-
245-
246-
# Execute only if run as main.py or code.py
247-
if __name__ == "__main__":
248-
_main()

adafruit_boardtest/boardtest_uart.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -98,27 +98,3 @@ def run_test(pins, tx_pin=TX_PIN_NAME, rx_pin=RX_PIN_NAME, baud_rate=BAUD_RATE):
9898
# Else (no pins found)
9999
print("No UART pins found")
100100
return NA, []
101-
102-
103-
def _main():
104-
105-
# List out all the pins available to us
106-
pins = list(dir(board))
107-
print()
108-
print("All pins found:", end=" ")
109-
110-
# Print pins
111-
for pin in pins:
112-
print(pin, end=" ")
113-
print("\n")
114-
115-
# Run test
116-
result = run_test(pins)
117-
print()
118-
print(result[0])
119-
print("Pins tested: " + str(result[1]))
120-
121-
122-
# Execute only if run as main.py or code.py
123-
if __name__ == "__main__":
124-
_main()

adafruit_boardtest/boardtest_voltage_monitor.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -89,27 +89,3 @@ def run_test(pins):
8989
# Else (no pins found)
9090
print("No battery monitor pins found")
9191
return NA, []
92-
93-
94-
def _main():
95-
96-
# List out all the pins available to us
97-
pins = list(dir(board))
98-
print()
99-
print("All pins found:", end=" ")
100-
101-
# Print pins
102-
for pin in pins:
103-
print(pin, end=" ")
104-
print("\n")
105-
106-
# Run test
107-
result = run_test(pins)
108-
print()
109-
print(result[0])
110-
print("Pins tested: " + str(result[1]))
111-
112-
113-
# Execute only if run as main.py or code.py
114-
if __name__ == "__main__":
115-
_main()

0 commit comments

Comments
 (0)