Repository navigation
Conversation
|
Hi @Aiman-D! 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! |
stroxler
left a comment
There was a problem hiding this comment.
Thanks @Aiman-D!
This looks good to me, but could you rebase once?
Context: we have auto-import hooks for PRs, but they don't run when the initial version goes up before the CLA is signed (because there would be licensing issues with importing).
Usually a rebase will trigger auto-import, which makes it easier to review and merge. I've been meaning to try to improve the tools but haven't found time.
This comment has been minimized.
This comment has been minimized.
4a5774f to
24fb444
Compare
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Note: this comment updates automatically after changes to the PR. Updates may take up to half an hour. |
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
|
Closing this PR because linked issue #5105 was closed. |
Summary
Parameter name inlay hints can be redundant when a positional argument is a variable with the exact same name as the parameter. For example, in
def foo(a, b): pass, callingfoo(a, c)previously displayed hints for botha=andb=.With this change:
Expr::Name) matching the parameter name.foo(obj.a, c)) still display their inlay hints.Param::Varargs), hints are suppressed when passing a matching starred argument (foo(*args)against*args), but retained when passing an unstarred argument (foo(args)) or a non-matching starred argument (foo(*items)).Fixes #5105
Test Plan
test_issue_5105_hide_hint_when_arg_matches_param_nameinpyrefly/lib/test/lsp/inlay_hint.rscovering:obj.aretaining hinta=/)*argsmatching vs non-matching vs unstarred)cargo test -p pyrefly --lib test::lsp::inlay_hint(52 passed, 0 failed)cargo test -p pyrefly --lib test::lsp(1404 passed, 0 failed, 3 ignored)python3 test.py --no-test --no-tensor-shapes --no-conformance --no-jsonschema --no-extension(fmt and clippy clean)