Skip to content

Commit 2ddf8e7

Browse files
committed
Lint
1 parent f935273 commit 2ddf8e7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

adafruit_midi/midi_message.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def channel_filter(channel, channel_spec):
5353
"""
5454
if isinstance(channel_spec, int):
5555
return channel == channel_spec
56-
elif isinstance(channel_spec, tuple):
56+
if isinstance(channel_spec, tuple):
5757
return channel in channel_spec
5858
raise ValueError("Incorrect type for channel_spec" + str(type(channel_spec)))
5959

@@ -162,8 +162,7 @@ def _search_eom_status(cls, buf, eom_status, msgstartidx, msgendidxplusone, endi
162162
else:
163163
bad_termination = True
164164
break
165-
else:
166-
msgendidxplusone += 1
165+
msgendidxplusone += 1
167166

168167
if good_termination or bad_termination:
169168
msgendidxplusone += 1
@@ -269,8 +268,8 @@ def from_message_bytes(cls, midibytes, channel_in):
269268
if complete_message:
270269
if channel_match_orna:
271270
break
272-
else: # advance to next message
273-
msgstartidx = msgendidxplusone
271+
# advance to next message
272+
msgstartidx = msgendidxplusone
274273
else:
275274
# Important case of a known message but one that is not
276275
# yet complete - leave bytes in buffer and wait for more

0 commit comments

Comments
 (0)