Skip to content

Fix test_snippets_completion to not depend on typeshed overload ordering#709

Merged
ccordoba12 merged 2 commits into
python-lsp:developfrom
frenzymadness:jedi_0_20_0_fix
Jul 18, 2026
Merged

Fix test_snippets_completion to not depend on typeshed overload ordering#709
ccordoba12 merged 2 commits into
python-lsp:developfrom
frenzymadness:jedi_0_20_0_fix

Conversation

@frenzymadness

Copy link
Copy Markdown
Contributor

jedi 0.20.0 bundles a newer typeshed that adds a no-arg overload for defaultdict.init as the first overload, causing format_snippet to hit the zero-params branch and produce "defaultdict()" instead of "defaultdict($0)". Replace defaultdict with a locally-defined function to make the test stable across typeshed updates.

jedi 0.20.0 bundles a newer typeshed that adds a no-arg overload for
defaultdict.__init__ as the first overload, causing format_snippet to
hit the zero-params branch and produce "defaultdict()" instead of
"defaultdict($0)". Replace defaultdict with a locally-defined function
to make the test stable across typeshed updates.
@ccordoba12 ccordoba12 added this to the v1.15.0 milestone Jul 18, 2026
@ccordoba12 ccordoba12 changed the title Fix test_snippets_completion to not depend on typeshed overload ordering Fix test_snippets_completion to not depend on typeshed overload ordering Jul 18, 2026

@ccordoba12 ccordoba12 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution @frenzymadness!

@ccordoba12
ccordoba12 merged commit e088ce3 into python-lsp:develop Jul 18, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants