Added type hints to terminalio

This commit is contained in:
dherrada 2020-07-03 11:31:57 -04:00
parent 6e4c76a926
commit f8229372bd

View File

@ -40,7 +40,7 @@
//| class Terminal: //| class Terminal:
//| """Display a character stream with a TileGrid""" //| """Display a character stream with a TileGrid"""
//| //|
//| def __init__(self, tilegrid: Any, font: Any): //| def __init__(self, tilegrid: bitmap, font: fontio.BuiltinFont):
//| """Terminal manages tile indices and cursor position based on VT100 commands. The font should be //| """Terminal manages tile indices and cursor position based on VT100 commands. The font should be
//| a `fontio.BuiltinFont` and the TileGrid's bitmap should match the font's bitmap.""" //| a `fontio.BuiltinFont` and the TileGrid's bitmap should match the font's bitmap."""
//| ... //| ...
@ -72,7 +72,7 @@ STATIC mp_obj_t terminalio_terminal_make_new(const mp_obj_type_t *type, size_t n
// These are standard stream methods. Code is in py/stream.c. // These are standard stream methods. Code is in py/stream.c.
// //
//| def write(self, buf: Any) -> Any: //| def write(self, buf: ReadableBuffer) -> Optional[int]:
//| """Write the buffer of bytes to the bus. //| """Write the buffer of bytes to the bus.
//| //|
//| :return: the number of bytes written //| :return: the number of bytes written