From 48ea2271b78e6bce8b59b5280ccfb81212070e79 Mon Sep 17 00:00:00 2001 From: dherrada Date: Fri, 3 Jul 2020 10:08:25 -0400 Subject: Added type hints to fontio --- shared-bindings/fontio/BuiltinFont.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'shared-bindings') diff --git a/shared-bindings/fontio/BuiltinFont.c b/shared-bindings/fontio/BuiltinFont.c index 169937553..cc4d50fe2 100644 --- a/shared-bindings/fontio/BuiltinFont.c +++ b/shared-bindings/fontio/BuiltinFont.c @@ -46,7 +46,7 @@ //| ... //| -//| bitmap: Any = ... +//| bitmap: bitmap = ... //| """Bitmap containing all font glyphs starting with ASCII and followed by unicode. Use //| `get_glyph` in most cases. This is useful for use with `displayio.TileGrid` and //| `terminalio.Terminal`.""" @@ -64,7 +64,7 @@ const mp_obj_property_t fontio_builtinfont_bitmap_obj = { (mp_obj_t)&mp_const_none_obj}, }; -//| def get_bounding_box(self) -> Any: +//| def get_bounding_box(self) -> Tuple[int, int]: //| """Returns the maximum bounds of all glyphs in the font in a tuple of two values: width, height.""" //| ... //| @@ -76,7 +76,7 @@ STATIC mp_obj_t fontio_builtinfont_obj_get_bounding_box(mp_obj_t self_in) { MP_DEFINE_CONST_FUN_OBJ_1(fontio_builtinfont_get_bounding_box_obj, fontio_builtinfont_obj_get_bounding_box); -//| def get_glyph(self, codepoint: Any) -> Any: +//| def get_glyph(self, codepoint: int) -> fontio.Glyph: //| """Returns a `fontio.Glyph` for the given codepoint or None if no glyph is available.""" //| ... //| -- cgit v1.2.3