-
Notifications
You must be signed in to change notification settings - Fork 3
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
Emit correct type stubs for async functions wrapped with additional decorators #194
Conversation
f9b01a7
to
076ba13
Compare
src/synchronicity/async_wrap.py
Outdated
@@ -38,6 +38,15 @@ async def wrapper(*args, **kwargs): | |||
return functools.wraps(func) | |||
|
|||
|
|||
def is_coroutine_function_follow_wrapped(func: typing.Callable) -> bool: | |||
"""Determine if a function returns a coroutine, unwrapping decorators, but not the async synchronicitiy interace.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Typo in docstring: synchronicitiy
b06bfa8
to
a1f7e00
Compare
57df19c
to
8b4b763
Compare
@prbot approve |
Please request a reviewer to follow up with a post-merge review. |
@prbot approve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved 👍. @freider will follow-up review this.
Basically stumbled around in the dark until I got this working, so I'm not sure it's correct or ideal. But it gets my test case and actual usecase working AFAICT.