Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve the typing for emitter decorators @native @viper etc #784

Open
Josverl opened this issue Feb 6, 2025 · 0 comments
Open

improve the typing for emitter decorators @native @viper etc #784

Josverl opened this issue Feb 6, 2025 · 0 comments
Labels
reference reference stubs for micropython

Comments

@Josverl
Copy link
Owner

Josverl commented Feb 6, 2025

from typing_extensions import ParamSpec, TypeVar

P = ParamSpec("P")
R = TypeVar("R")

def viper(_func: Callable[P, R], /) -> Callable[P, R]:
    """A type-safe decorator to add logging to a function."""
    ...
@Josverl Josverl added the reference reference stubs for micropython label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reference reference stubs for micropython
Projects
None yet
Development

No branches or pull requests

1 participant