summaryrefslogtreecommitdiff
path: root/shared-bindings/terminalio
diff options
context:
space:
mode:
authordherrada <dylan.herrada@gmail.com>2020-05-12 11:28:33 -0400
committerdherrada <dylan.herrada@gmail.com>2020-05-12 11:28:33 -0400
commit991045b9ce958db9d7102d621f4e7860301e4c21 (patch)
tree2dfbc434cc3c2268ef01c6f7a6389c306f56a973 /shared-bindings/terminalio
parent603df58f971743bc36b9e391cd5fb04812262533 (diff)
Did struct, supervisor, terminalio
Diffstat (limited to 'shared-bindings/terminalio')
-rw-r--r--shared-bindings/terminalio/Terminal.c26
-rw-r--r--shared-bindings/terminalio/__init__.c4
2 files changed, 15 insertions, 15 deletions
diff --git a/shared-bindings/terminalio/Terminal.c b/shared-bindings/terminalio/Terminal.c
index 9c01fba20..1288b7018 100644
--- a/shared-bindings/terminalio/Terminal.c
+++ b/shared-bindings/terminalio/Terminal.c
@@ -37,16 +37,16 @@
#include "shared-bindings/fontio/BuiltinFont.h"
#include "supervisor/shared/translate.h"
-
-//| .. currentmodule:: terminalio
-//|
-//| :class:`Terminal` -- display a character stream with a TileGrid
-//| ================================================================
+//| class Terminal:
+//| """.. currentmodule:: terminalio
//|
-//| .. class:: Terminal(tilegrid, font)
+//| :class:`Terminal` -- display a character stream with a TileGrid
+//| ================================================================"""
//|
-//| 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.
+//| def __init__(self, tilegrid: Any, font: Any):
+//| """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."""
+//| ...
//|
STATIC mp_obj_t terminalio_terminal_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
@@ -75,12 +75,12 @@ 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.
//
-//| .. method:: write(buf)
-//|
-//| Write the buffer of bytes to the bus.
+//| def write(self, buf: Any) -> Any:
+//| """Write the buffer of bytes to the bus.
//|
-//| :return: the number of bytes written
-//| :rtype: int or None
+//| :return: the number of bytes written
+//| :rtype: int or None"""
+//| ...
//|
STATIC mp_uint_t terminalio_terminal_write(mp_obj_t self_in, const void *buf_in, mp_uint_t size, int *errcode) {
terminalio_terminal_obj_t *self = MP_OBJ_TO_PTR(self_in);
diff --git a/shared-bindings/terminalio/__init__.c b/shared-bindings/terminalio/__init__.c
index a9fe20f30..591be839a 100644
--- a/shared-bindings/terminalio/__init__.c
+++ b/shared-bindings/terminalio/__init__.c
@@ -35,7 +35,7 @@
#include "py/runtime.h"
-//| :mod:`terminalio` --- Displays text in a TileGrid
+//| """:mod:`terminalio` --- Displays text in a TileGrid
//| =================================================
//|
//| .. module:: terminalio
@@ -49,7 +49,7 @@
//| .. toctree::
//| :maxdepth: 3
//|
-//| Terminal
+//| Terminal"""
//|
//|
STATIC const mp_rom_map_elem_t terminalio_module_globals_table[] = {