From e064cabcea3364bed0e080cc87bd787e957899f9 Mon Sep 17 00:00:00 2001 From: JoBe <165585785+JoBeGaming@users.noreply.github.com> Date: Fri, 16 May 2025 16:14:59 +0200 Subject: [PATCH] Create __init__.py Signed-off-by: JoBe <165585785+JoBeGaming@users.noreply.github.com> --- python-stdlib/typing/__init__.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 python-stdlib/typing/__init__.py diff --git a/python-stdlib/typing/__init__.py b/python-stdlib/typing/__init__.py new file mode 100644 index 000000000..12b090811 --- /dev/null +++ b/python-stdlib/typing/__init__.py @@ -0,0 +1,19 @@ +# Typing module ported to MicroPython + +# For official documentation, see https://github.com/python/cpython/blob/main/Lib/typing.py + +class Any: + """typing.Any""" + + def __init_subclass__(cls, **kwargs): + if not "_root" in kwargs: + raise TypeError("Any is not subclassable") + +class Callable(Any, root): + """typing.Callable""" + +class Generic: + + def __class_getitem__(cls, items): ... + def __init_subclass__(cls, **kwargs): ... + def __new__(cls, *args, **kwargs): ...