Repository navigation
Conversation
|
Hi @Sano007! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
This comment has been minimized.
This comment has been minimized.
stroxler
left a comment
There was a problem hiding this comment.
Cool, thanks!
Could you rebase this? I think it looks good, but our PR import doesn't run on a PR made before the CLA is singed, ususally rebasing will trigger an import that we can then merge
|
Sure, I'll do it right now |
Return the enclosing binary expression range with operator hover responses so editors highlight the complete operation instead of only showing hover content.
806a949 to
6a3cde3
Compare
|
This pull request has been imported. If you are a Meta employee, you can view this in D128397374. (Because this pull request was imported automatically, there will not be any future comments.) |
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
stroxler
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
Summary: Subscript hover must not replace the type of an operator inside its index expression. Let the innermost operator resolve through the existing hover path while retaining bracket, literal, and identifier hovers. This keeps the hover contents aligned with the expression highlighted by PR #5306. It also covers boolean, unary, and comparison operators through the same ownership rule. No type-checking diagnostics change. ___ landed-with-radar-review Differential Revision: D129122405 fbshipit-source-id: aae0e3b5ef1746bd16ec1c25fad3049e7501192b
|
This pull request has been merged in a9fc1dd. |
Return the enclosing binary expression range with operator hover responses so editors highlight the complete operation instead of only showing hover content.
Summary
When hovering over a binary operator, Pyrefly already displays the corresponding
operator method, but it does not provide a range for the editor to highlight.
This change returns the range of the enclosing binary expression. For example,
hovering over
|inx = a | bnow highlightsa | b.Fixes #5104
Test Plan
cargo test test::lsp::hover./test.py --no-test --no-tensor-shapes --no-conformance --no-jsonschema --no-extensionVerified that hovering over
|inx = a | bhighlightsa | b.