[ty] Enforce sort order of completions by BurntSushi · Pull Request #18917 · astral-sh/ruff (original) (raw)

MichaReiser

@BurntSushi

We achieve this by setting the "sort text" field of every completion. Since we are trying to be smart about the order, we want the client to respect our order.

Prior to this change, VS Code was re-sorting completions in lexicographic order. This in turn resulted in dunder attributes appearing before "normal" attributes.

dcreager added a commit that referenced this pull request

Jun 24, 2025

@dcreager

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})