← Open Source & Engineering Work
Meta · PyreflyMerged Upstream

Deduplicating Method Definition Completions

A shipped Meta Pyrefly contribution that keeps method definitions on 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 appear twice while unrelated values leaked into the method-definition completion list.

02 · Technical response

What changed

  1. 01Separated method-definition completion from ordinary value-completion paths.
  2. 02Preserved dedicated class and magic-method candidate logic.
  3. 03Added focused regression coverage proving that a prefixed existing method is returned exactly once.
  4. 04Kept the patch limited to completion behavior and its regression test.

03 · Verified outcome

Evidence-backed result

  • 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 remains explicit that this was independent open-source work, not a Meta engagement.

04 · Public record

Source evidence

RustPythonPyreflyLanguage ServerCode Completion

Independent open-source engineering by Patrick Ribbsaeter. Company and project names identify the public repository and maintainer context only. No employment, client, vendor, or partnership relationship is implied unless explicitly stated.