Skip to content

Fix test_snippets_completion to not depend on typeshed overload ordering#709

Open
frenzymadness wants to merge 1 commit intopython-lsp:developfrom
frenzymadness:jedi_0_20_0_fix
Open

Fix test_snippets_completion to not depend on typeshed overload ordering#709
frenzymadness wants to merge 1 commit intopython-lsp:developfrom
frenzymadness:jedi_0_20_0_fix

Conversation

@frenzymadness
Copy link
Copy Markdown

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant