-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Add IDE friendly type annotation for jit #9932
Labels
enhancement
New feature or request
Comments
Did #9950 take care of this? |
@froystig from typing import TypeVar, Callable
from typing_extensions import ParamSpec, Protocol
T = TypeVar('T')
P = ParamSpec('P')
class Wrapped(Protocol[P, T]):
def __call__(self, *args: P.args, **kwargs: P.kwargs) -> T:
"""Executes the wrapped function, lowering and compiling as needed."""
def jit(f: Callable[P, T]) -> Wrapped[P, T]:
pass
def f(x: float, y: float):
return x + y May I create a PR for it? |
#10311 Instead. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see #9917
The text was updated successfully, but these errors were encountered: