@@ -288,9 +288,11 @@ def from_bytes(cls, msg_bytes):
288288 def __str__ (self ):
289289 """Print an instance"""
290290 cls = self .__class__
291- if slots := getattr (cls , '_message_slots' , None ):
292- args = ", " .join (f"{ name } ={ repr (getattr (self , name , None ))} "
293- for name in slots )
291+ if slots := getattr (cls , "_message_slots" , None ):
292+ # pylint: disable=not-an-iterable
293+ args = ", " .join (
294+ f"{ name } ={ repr (getattr (self , name , None ))} " for name in slots
295+ )
294296 else :
295297 args = "..."
296298 return f"{ self .__class__ .__name__ } ({ args } )"
@@ -308,7 +310,7 @@ class MIDIUnknownEvent(MIDIMessage):
308310 or because it is not imported.
309311 """
310312
311- _message_slots = [' status' ]
313+ _message_slots = [" status" ]
312314 LENGTH = - 1
313315
314316 def __init__ (self , status ):
@@ -329,7 +331,7 @@ class MIDIBadEvent(MIDIMessage):
329331
330332 LENGTH = - 1
331333
332- _message_slots = [' msg_bytes' , ' exception' ]
334+ _message_slots = [" msg_bytes" , " exception" ]
333335
334336 def __init__ (self , msg_bytes , exception ):
335337 self .data = bytes (msg_bytes )
0 commit comments