1 # SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
3 # SPDX-License-Identifier: MIT
5 `micropython` - MicroPython Specific Decorator Functions
6 ========================================================
11 from typing import Callable, TypeVar, Any, NoReturn
13 Fun = TypeVar("Fun", bound=Callable[..., Any])
17 "Emulate making a constant"
19 def native(f: Fun) -> Fun:
20 "Emulate making a native"
22 def viper(f: Fun) -> NoReturn:
23 "User is attempting to use a viper code emitter"
25 def asm_thumb(f: Fun) -> NoReturn:
26 "User is attempting to use an inline assembler"