Skip to content

Fix hover names from quoted definition snippets#4049

Open
WilliamK112 wants to merge 1 commit into
facebook:mainfrom
WilliamK112:codex/pyrefly-hover-quoted-function-name-4004
Open

Fix hover names from quoted definition snippets#4049
WilliamK112 wants to merge 1 commit into
facebook:mainfrom
WilliamK112:codex/pyrefly-hover-quoted-function-name-4004

Conversation

@WilliamK112

Copy link
Copy Markdown

Summary:

  • avoid using quoted string-literal definition snippets as hover display names
  • prefer the semantic display name or callable metadata fallback, so signatures render as def array(...) instead of def 'array'(...)
  • keep normal source-definition snippets unchanged and cover the quoted-name path with regression tests

Fixes #4004.

Test plan:

  • cargo +stable-x86_64-pc-windows-gnu fmt --all --check
  • cargo +stable-x86_64-pc-windows-gnu test -p pyrefly --lib lsp::wasm::hover::tests -- --nocapture
  • cargo +stable-x86_64-pc-windows-gnu test -p pyrefly --test pyrefly_lsp_interaction_tests hover -- --nocapture
  • cargo +stable-x86_64-pc-windows-gnu check -p pyrefly
  • git diff --check

@meta-cla meta-cla Bot added the cla signed label Jul 5, 2026
@github-actions github-actions Bot added the size/m label Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

numpy array 's signature is a bit strange

1 participant