Skip to content

Commit 0fba8ff

Browse files
author
Kevin J Walters
committed
More pylint happiness for examples. #3
1 parent c1740cb commit 0fba8ff

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

examples/midi_inoutdemo.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# midi_inoutdemo - demonstrates receiving and sending MIDI events
22

3-
import time
4-
import random
5-
63
import adafruit_midi
74

85
# TimingClock is worth importing first if present as it
96
# will make parsing more efficient for this high frequency event
107
# Only importing what is used will save a little bit of memory
8+
9+
# pylint: disable=unused-import
1110
from adafruit_midi.timing_clock import TimingClock
1211
from adafruit_midi.channel_pressure import ChannelPressure
1312
from adafruit_midi.control_change import ControlChange
@@ -22,7 +21,7 @@
2221

2322
from adafruit_midi.midi_message import MIDIUnknownEvent
2423

25-
midi = adafruit_midi.MIDI(in_channel=(1,2,3), out_channel=0)
24+
midi = adafruit_midi.MIDI(in_channel=(1, 2, 3), out_channel=0)
2625

2726
print("Midi Demo in and out")
2827

@@ -44,8 +43,8 @@
4443
if 0 <= new_note <= 127:
4544
midi.send(NoteOn(new_note, msg_in.velocity))
4645

47-
elif (isinstance(msg_in, NoteOff) or
48-
isinstance(msg_in, NoteOn) and msg_in.velocity == 0):
46+
elif (isinstance(msg_in, NoteOff)
47+
or isinstance(msg_in, NoteOn) and msg_in.velocity == 0):
4948
for offset in major_chord:
5049
new_note = msg_in.note + offset
5150
if 0 <= new_note <= 127:

0 commit comments

Comments
 (0)