From 957cf4a5bf4ccf2bbeff79de299f3ab08cc474a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Sat, 23 May 2026 09:54:13 +0200 Subject: [PATCH] Update defaultdict snippet expectation for Jedi 0.20 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. --- test/plugins/test_completion.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/plugins/test_completion.py b/test/plugins/test_completion.py index ae5021f5..eaec53d0 100644 --- a/test/plugins/test_completion.py +++ b/test/plugins/test_completion.py @@ -334,8 +334,8 @@ def test_snippets_completion(config, workspace) -> None: com_position = {"line": 1, "character": len(doc_snippets)} completions = pylsp_jedi_completions(config, doc, com_position) - assert completions[0]["insertText"] == "defaultdict($0)" - assert completions[0]["insertTextFormat"] == lsp.InsertTextFormat.Snippet + assert completions[0]["insertText"] == "defaultdict()" + assert not completions[0].get("insertTextFormat", None) def test_snippets_completion_at_most(config, workspace) -> None: