]> Repositories - Adafruit_Blinka-hackapet.git/blob - src/micropython-stubs/micropython.pyi
fix wrongly assuming "of_node/compatible" will always exist for all gpiochips
[Adafruit_Blinka-hackapet.git] / src / micropython-stubs / micropython.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
15 def const(x: int) -> int:
16     "Emulate making a constant"
17
18 def native(f: Fun) -> Fun:
19     "Emulate making a native"
20
21 def viper(f: Fun) -> NoReturn:
22     "User is attempting to use a viper code emitter"
23
24 def asm_thumb(f: Fun) -> NoReturn:
25     "User is attempting to use an inline assembler"