Added type hints to multiterminal

This commit is contained in:
dherrada 2020-07-03 15:08:16 -04:00
parent 591cc1a243
commit 9122d0b9f4

View File

@ -37,7 +37,7 @@
//| serial connection and the optional secondary connection."""
//|
//| def get_secondary_terminal() -> Any:
//| def get_secondary_terminal() -> secondary_terminal:
//| """Returns the current secondary terminal."""
//| ...
//|
@ -46,7 +46,7 @@ STATIC mp_obj_t multiterminal_obj_get_secondary_terminal() {
}
MP_DEFINE_CONST_FUN_OBJ_0(multiterminal_get_secondary_terminal_obj, multiterminal_obj_get_secondary_terminal);
//| def set_secondary_terminal(stream: stream) -> Any:
//| def set_secondary_terminal(stream: stream) -> None:
//| """Read additional input from the given stream and write out back to it.
//| This doesn't replace the core stream (usually UART or native USB) but is
//| mixed in instead.
@ -68,7 +68,7 @@ STATIC mp_obj_t multiterminal_obj_set_secondary_terminal(mp_obj_t secondary_term
}
MP_DEFINE_CONST_FUN_OBJ_1(multiterminal_set_secondary_terminal_obj, multiterminal_obj_set_secondary_terminal);
//| def clear_secondary_terminal() -> Any:
//| def clear_secondary_terminal() -> None:
//| """Clears the secondary terminal."""
//| ...
//|
@ -78,7 +78,7 @@ STATIC mp_obj_t multiterminal_obj_clear_secondary_terminal() {
}
MP_DEFINE_CONST_FUN_OBJ_0(multiterminal_clear_secondary_terminal_obj, multiterminal_obj_clear_secondary_terminal);
//| def schedule_secondary_terminal_read(socket: Any) -> Any:
//| def schedule_secondary_terminal_read(socket: secondary_terminal) -> None:
//| """In cases where the underlying OS is doing task scheduling, this notifies
//| the OS when more data is available on the socket to read. This is useful
//| as a callback for lwip sockets."""