-
Notifications
You must be signed in to change notification settings - Fork 454
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 type hint for run_task and run_thread #3459
Conversation
Reviewer's Guide by SourceryThis pull request adds type hints to various methods in the File-Level Changes
Tips
|
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.
Hey @zrr1999 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 6 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
…ies to `Window` and `BrowserContextMenu` classes (#3463) * initial commit * commit * update Window * create BrowserContextMenu class * chore: remove deprecation_warning and reformat deprecated * change signal to SIG_DFL after exit_gracefully (#3466) * improve type hint for run_task and run_thread (#3459) * add type hint * fix Future[RetT] * feat(map): add missing py-events, better typing (#3464) * initial commit * commit * update Window * create BrowserContextMenu class * chore: remove deprecation_warning and reformat deprecated * Geolocator: rename some classes and methods --------- Co-authored-by: Zhan Rongrui <[email protected]>
* add type hint * fix Future[RetT]
…ies to `Window` and `BrowserContextMenu` classes (flet-dev#3463) * initial commit * commit * update Window * create BrowserContextMenu class * chore: remove deprecation_warning and reformat deprecated * change signal to SIG_DFL after exit_gracefully (flet-dev#3466) * improve type hint for run_task and run_thread (flet-dev#3459) * add type hint * fix Future[RetT] * feat(map): add missing py-events, better typing (flet-dev#3464) * initial commit * commit * update Window * create BrowserContextMenu class * chore: remove deprecation_warning and reformat deprecated * Geolocator: rename some classes and methods --------- Co-authored-by: Zhan Rongrui <[email protected]>
Description
Optimized the type annotations for run_task and run_thread, ensuring that the user's function can still retain annotation information even after wrapping another layer of run_task or run_thread.
In addition, it also supports kwargs for run_thread.
Test Code
# Test code for the review of this PR
Type of change
Checklist:
Screenshots (if applicable):
->
Additional details