Skip to content

Update defaultdict snippet expectation for Jedi 0.20 - #711

Closed
mcepl wants to merge 1 commit into
python-lsp:developfrom
openSUSE-Python:compatibility-jedi-0_20
Closed

Update defaultdict snippet expectation for Jedi 0.20#711
mcepl wants to merge 1 commit into
python-lsp:developfrom
openSUSE-Python:compatibility-jedi-0_20

Conversation

@mcepl

Copy link
Copy Markdown

Jedi 0.20 now resolves collections.defaultdict with an empty callable signature, so pylsp formats the completion as defaultdict() instead of the placeholder snippet defaultdict($0). Update the completion test to reflect that this result is plain insert text and therefore does not include insertTextFormat.

Jedi 0.20 now resolves collections.defaultdict with an empty callable
signature, so pylsp formats the completion as defaultdict() instead of
the placeholder snippet defaultdict($0). Update the completion test to
reflect that this result is plain insert text and therefore does not
include insertTextFormat.
algitbot pushed a commit to alpinelinux/aports that referenced this pull request May 25, 2026
Apply this patch:
python-lsp/python-lsp-server#711
Fix for:
> assert completions[0]["insertText"] == "defaultdict($0)"
E AssertionError: assert 'defaultdict()' == 'defaultdict($0)'
E
E - defaultdict($0)
E ? --
E + defaultdict()
test/plugins/test_completion.py:337: AssertionError
@ccordoba12

Copy link
Copy Markdown
Member

Closing as superseded by PR #709.

Sign up for freeto 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.

2 participants

@mcepl@ccordoba12