Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.2k
Make sureinspect.iscoroutinefunction
works on coroutines decorated with@validate_call
#10374
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@sydney-runkle , please review. |
codspeed-hqbot commentedSep 10, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
CodSpeed Performance ReportMerging#10374 willnot alter performanceComparing Summary
|
github-actionsbot commentedSep 10, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Coverage reportClick to see where and how coverage changed
This report was generated bypython-coverage-comment-action |
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.
Looking good, could you please add a test as well? Thanks!
Uh oh!
There was an error while loading.Please reload this page.
I don't quite understand what changes need to be made to the test cases. I add some codes to check if it is a coroutine the async function under decorator. Please check it, thank you! |
Uh oh!
There was an error while loading.Please reload this page.
Something like: importinspect@validate_callasyncdeftest():passassertinspect.iscoroutinefunction(test) |
inspect.iscoroutinefunction
works on coroutines decorated with@validate_call
Happy to do another review here after we:
currently:
desired:
Thanks, great work here! |
@Viicos@sydney-runkle I finish all@sydney-runkle mentioned. Please check it, thank you! |
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.
check
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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.
Awesome job, thanks for the help here!!
1cb0a8b
intopydantic:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Change Summary
Add judgement for validate_call decorator. Now we can get
True
return frominpect.iscoroutinefunction()
.Related issue number
fix#10370
Checklist
Selected Reviewer:@sydney-runkle