Merge pull request #991 from dunkmann00/micro-stubs

Make micropython.const accept any constant type
This commit is contained in:
Melissa LeBlanc-Williams 2025-07-16 08:29:22 -07:00 committed by GitHub
commit f79764b77c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,8 +11,9 @@
from typing import Callable, TypeVar, Any, NoReturn from typing import Callable, TypeVar, Any, NoReturn
Fun = TypeVar("Fun", bound=Callable[..., Any]) Fun = TypeVar("Fun", bound=Callable[..., Any])
T = TypeVar("T")
def const(x: int) -> int: def const(x: T) -> T:
"Emulate making a constant" "Emulate making a constant"
def native(f: Fun) -> Fun: def native(f: Fun) -> Fun: