Skip to content

Commit d507b42

Browse files
author
Kevin J Walters
committed
Removing old TODO, polishing docs for MIDIMessage.register_message_type() and upper case for exception from MIDIMessage.channel . #3 #9
1 parent bb44772 commit d507b42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_midi/midi_message.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ class MIDIMessage:
122122
_statusandmask_to_class = []
123123

124124
def __init__(self, *, channel=None):
125-
### TODO - can i kwargs this?????
126125
self._channel = channel # dealing with pylint inadequacy
127126
self.channel = channel
128127

@@ -136,12 +135,13 @@ def channel(self):
136135
@channel.setter
137136
def channel(self, channel):
138137
if channel is not None and not 0 <= channel <= 15:
139-
raise "channel must be 0-15 or None"
138+
raise "Channel must be 0-15 or None"
140139
self._channel = channel
141140

142141
@classmethod
143142
def register_message_type(cls):
144143
"""Register a new message by its status value and mask.
144+
This is called automagically at ``import`` time for each message.
145145
"""
146146
### These must be inserted with more specific masks first
147147
insert_idx = len(MIDIMessage._statusandmask_to_class)

0 commit comments

Comments
 (0)