Skip to content

Commit 6a430fb

Browse files
committed
Pylint-ified two example files, I did not intend to change:-(
1 parent 486cf99 commit 6a430fb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/circuitplayground_ir_receive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
# Create a 'pulseio' input, to listen to infrared signals on the IR receiver
1515
try:
1616
pulsein = pulseio.PulseIn(board.IR_RX, maxlen=120, idle_state=True)
17-
except AttributeError:
17+
except AttributeError as e:
1818
raise NotImplementedError(
1919
"This example does not work with Circuit Playground Bluefruti!"
20-
)
20+
) from e
2121
# Create a decoder that will take pulses and turn them into numbers
2222
decoder = adafruit_irremote.GenericDecode()
2323

examples/circuitplayground_ir_transmit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
# Create a 'pulseio' output, to send infrared signals from the IR transmitter
1616
try:
1717
pwm = pulseio.PWMOut(board.IR_TX, frequency=38000, duty_cycle=2 ** 15)
18-
except AttributeError:
18+
except AttributeError as e:
1919
raise NotImplementedError(
2020
"This example does not work with Circuit Playground Bluefruit!"
21-
)
21+
) from e
2222
pulseout = pulseio.PulseOut(pwm) # pylint: disable=no-member
2323
# Create an encoder that will take numbers and turn them into NEC IR pulses
2424
encoder = adafruit_irremote.GenericTransmit(

0 commit comments

Comments
 (0)