]> Repositories - Adafruit_Blinka-hackapet.git/blob - src/micropython-stubs/__init__.pyi
Merge pull request #1002 from makermelissa/main
[Adafruit_Blinka-hackapet.git] / src / micropython-stubs / __init__.pyi
1 # SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
2 #
3 # SPDX-License-Identifier: MIT
4 """
5 `micropython` - MicroPython Specific Decorator Functions
6 ========================================================
7
8 * Author(s): cefn
9 """
10
11 from typing import Callable, TypeVar, Any, NoReturn
12
13 Fun = TypeVar("Fun", bound=Callable[..., Any])
14 T = TypeVar("T")
15
16 def const(x: T) -> T:
17     "Emulate making a constant"
18
19 def native(f: Fun) -> Fun:
20     "Emulate making a native"
21
22 def viper(f: Fun) -> NoReturn:
23     "User is attempting to use a viper code emitter"
24
25 def asm_thumb(f: Fun) -> NoReturn:
26     "User is attempting to use an inline assembler"