-
-
Notifications
You must be signed in to change notification settings - Fork 81
Add type annotation to Parameter.rx property #1112
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: MarcSkovMadsen <[email protected]>
Co-authored-by: MarcSkovMadsen <[email protected]>
Co-authored-by: MarcSkovMadsen <[email protected]>
Co-authored-by: MarcSkovMadsen <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1112 +/- ##
=======================================
Coverage 89.22% 89.22%
=======================================
Files 9 9
Lines 4716 4716
=======================================
Hits 4208 4208
Misses 508 508 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
MarcSkovMadsen
left a comment
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.
MarcSkovMadsen
left a comment
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.
studying reactive_ops I can see it actually returns rx class defined in reactive.py. Please update the type annotation. Fix any failing pytest or pre-commit tests.
Co-authored-by: MarcSkovMadsen <[email protected]>
Updated type annotation from |
|
This is a confusing PR, with AI creating 6 commits that in the end change two lines of code, and apparently not much human confidence in the second line changed, but I guess it seems to be an improvement. |


The
Parameter.rxproperty was not type annotated, preventing IDEs from providing autocomplete and type information for reactive expressions.Changes
-> 'rx'return type annotation toParameter.rxpropertyrxunderTYPE_CHECKINGguard to avoid circular import withreactivemoduleWith this change, IDEs will correctly identify
p.param.a.rxasrx, enabling autocomplete for reactive operations like.pipe(),.map(),.and_(), etc., matching the type expectations of basedpyright and other type checkers.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.