From 60c8de531b06c1eeedf4bc3ffece67834170d72b Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak <dos@dosowisko.net> Date: Sun, 12 Nov 2023 21:32:39 +0100 Subject: [PATCH] python_payload: Fix broken type hints --- python_payload/apps/appearance/__init__.py | 1 + python_payload/apps/graphics_mode/__init__.py | 1 + python_payload/apps/mandelbrot/__init__.py | 1 + python_payload/apps/w1f1/k3yboard.py | 4 ++-- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/python_payload/apps/appearance/__init__.py b/python_payload/apps/appearance/__init__.py index 979081fd6d..b00fe99e0b 100644 --- a/python_payload/apps/appearance/__init__.py +++ b/python_payload/apps/appearance/__init__.py @@ -4,6 +4,7 @@ from st3m import settings import leds import sys_display from st3m.ui import colours, led_patterns +from ctx import Context class App(Application): diff --git a/python_payload/apps/graphics_mode/__init__.py b/python_payload/apps/graphics_mode/__init__.py index 1de216533b..39da6c0fec 100644 --- a/python_payload/apps/graphics_mode/__init__.py +++ b/python_payload/apps/graphics_mode/__init__.py @@ -1,5 +1,6 @@ from st3m.application import Application import math, random, sys_display +from ctx import Context class App(Application): diff --git a/python_payload/apps/mandelbrot/__init__.py b/python_payload/apps/mandelbrot/__init__.py index 0de97fb48b..d7808d74df 100644 --- a/python_payload/apps/mandelbrot/__init__.py +++ b/python_payload/apps/mandelbrot/__init__.py @@ -1,5 +1,6 @@ from st3m.application import Application import sys_display, math, random +from ctx import Context class App(Application): diff --git a/python_payload/apps/w1f1/k3yboard.py b/python_payload/apps/w1f1/k3yboard.py index c5333d1b78..a04a342012 100644 --- a/python_payload/apps/w1f1/k3yboard.py +++ b/python_payload/apps/w1f1/k3yboard.py @@ -6,7 +6,7 @@ from ctx import Context import st3m.run from st3m import Responder, InputState from st3m.application import Application, ApplicationContext -from st3m.goose import ABCBase, Enum +from st3m.goose import ABCBase, Enum, Optional from st3m.ui.view import BaseView, ViewManager from st3m.utils import tau @@ -57,7 +57,7 @@ class TextInputModel(Model): def input_right(self) -> str: return self._input_right - def move_cursor(self, direction: self.CursorDirection) -> None: + def move_cursor(self, direction: "TextInputModel.CursorDirection") -> None: """ Moves the cursor one step in specified direction. Any pending input will be committed beforehand. """ -- GitLab