Skip to content

Commit faeb38f

Browse files
fix flake8 warning in RTU examples for pyboard
1 parent fb9824d commit faeb38f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

examples/rtu_client_example.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@
5656
print('MicroPython infos: {}'.format(os_info))
5757
print('Used micropthon-modbus version: {}'.format(version.__version__))
5858

59-
if 'pyb' in os_info:
59+
if 'pyboard' in os_info:
6060
# NOT YET TESTED !
6161
# https://docs.micropython.org/en/latest/library/pyb.UART.html#pyb-uart
6262
# (TX, RX) = (X9, X10) = (PB6, PB7)
6363
uart_id = 1
64-
rtu_pins = (Pin(PB6), Pin(PB7)) # (TX, RX)
64+
# (TX, RX)
65+
rtu_pins = (Pin(PB6), Pin(PB7)) # noqa: F821
6566
elif 'esp8266' in os_info:
6667
# https://docs.micropython.org/en/latest/esp8266/quickref.html#uart-serial-bus
6768
raise Exception(

examples/rtu_host_example.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,13 @@
6161
print('MicroPython infos: {}'.format(os_info))
6262
print('Used micropthon-modbus version: {}'.format(version.__version__))
6363

64-
if 'pyb' in os_info:
64+
if 'pyboard' in os_info:
6565
# NOT YET TESTED !
6666
# https://docs.micropython.org/en/latest/library/pyb.UART.html#pyb-uart
6767
# (TX, RX) = (X9, X10) = (PB6, PB7)
6868
uart_id = 1
69-
rtu_pins = (Pin(PB6), Pin(PB7)) # (TX, RX)
69+
# (TX, RX)
70+
rtu_pins = (Pin(PB6), Pin(PB7)) # noqa: F821
7071
elif 'esp8266' in os_info:
7172
# https://docs.micropython.org/en/latest/esp8266/quickref.html#uart-serial-bus
7273
raise Exception(

0 commit comments

Comments
 (0)