Add type stubs for mido MIDI library
- Created type stubs for various modules in the mido library including messages, midifiles, parser, ports, sockets, syx, tokenizer, and version. - Implemented type hints for functions and classes to improve type checking and code clarity. - Added support for MIDI over TCP/IP in sockets module. - Included methods for reading and writing SYX files in syx module. - Enhanced the parser functionality with a dedicated Parser class for MIDI byte streams. - Established a structure for MIDI file handling with MidiFile and MidiTrack classes.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
from collections.abc import Callable
|
||||
|
||||
from .specs import MsgDict
|
||||
|
||||
_SPECIAL_CASES: dict[str, Callable[[MsgDict], list[object]]]
|
||||
|
||||
def encode_message(msg: MsgDict) -> list[int]:
|
||||
"""Encode msg dict as a list of bytes.
|
||||
|
||||
TODO: Add type and value checking.
|
||||
(Can be turned off with keyword argument.)
|
||||
|
||||
This is not a part of the public API.
|
||||
"""
|
||||
Reference in New Issue
Block a user