Deduplicating Method Definition Completions in Meta Pyrefly
A directly shipped Meta Pyrefly contribution that keeps method definitions on the dedicated completion paths, removes duplicate existing-method suggestions, and prevents unrelated value completions from leaking into the list.
#4304
public PR
941711b
upstream commit
2
files changed
+25 / −1
focused diff
01 · Engineering problem
The failure mode
Method-name completion combined dedicated class and magic-method candidates with ordinary value completions. Existing methods could therefore appear twice while unrelated values leaked into the method-definition completion list.
02 · Technical response
What changed
- 01Separated method-definition completion from ordinary value-completion paths.
- 02Preserved the dedicated class and magic-method candidate logic.
- 03Added focused regression coverage proving that a prefixed existing method is returned exactly once.
- 04Kept the patch limited to completion behavior and its regression test.
03 · Verified outcome
Evidence, not implication
- ✓Meta imported PR #4304 into its internal development workflow.
- ✓The contribution shipped upstream in facebook/pyrefly at commit 941711b384d795a12b4413dd3daf0065fa37f93f.
- ✓Duplicate method suggestions were removed without broad language-server changes.
- ✓The public record shows the contribution as an independent open-source merge, not a Meta engagement.
04 · Public record
Source evidence
Independent engineering and open-source work by Patrick Ribbsaeter / Ribbsaeter Systems. References to maintainers, repositories, or companies identify the public technical context only. No employment, client, vendor, or partnership relationship is implied unless explicitly stated.