We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This works fine:
F = TypeVar('F', bound=Callable[..., Any]) def outer(f: F) -> F: def inner(*args): return f(*args) return cast(F, inner) @outer def foo(a: int) -> str: return str(a)
However adding this does not work (it reuses the outer decorator from above):
outer
def superouter() -> Callable[[F], F]: return outer @superouter() # E: Argument 1 has incompatible type Callable[[str], int]; expected None def bar(b: str) -> int: return int(b)
The text was updated successfully, but these errors were encountered:
This is a duplicate of #1551, though the exact errors seem to have changed a little since then.
Sorry, something went wrong.
No branches or pull requests
This works fine:
However adding this does not work (it reuses the
outer
decorator from above):The text was updated successfully, but these errors were encountered: