Skip to content

Commit f79764b

Browse files
authored
Merge pull request #991 from dunkmann00/micro-stubs
Make micropython.const accept any constant type
2 parents a2ce100 + 0413de5 commit f79764b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/micropython-stubs/micropython.pyi renamed to src/micropython-stubs/__init__.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
from typing import Callable, TypeVar, Any, NoReturn
1212

1313
Fun = TypeVar("Fun", bound=Callable[..., Any])
14+
T = TypeVar("T")
1415

15-
def const(x: int) -> int:
16+
def const(x: T) -> T:
1617
"Emulate making a constant"
1718

1819
def native(f: Fun) -> Fun:

0 commit comments

Comments
 (0)