From 4f870bb8d125f319803da80eac36a0d098dd38bc Mon Sep 17 00:00:00 2001 From: Fabio Zadrozny Date: Sat, 19 Oct 2024 07:31:20 -0300 Subject: [PATCH] Support Annotated[cls] in code-completion --- .../pydev/ast/codecompletion/revisited/AbstractASTManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/org.python.pydev.ast/src/org/python/pydev/ast/codecompletion/revisited/AbstractASTManager.java b/plugins/org.python.pydev.ast/src/org/python/pydev/ast/codecompletion/revisited/AbstractASTManager.java index d80fb7b528..a9b5932118 100644 --- a/plugins/org.python.pydev.ast/src/org/python/pydev/ast/codecompletion/revisited/AbstractASTManager.java +++ b/plugins/org.python.pydev.ast/src/org/python/pydev/ast/codecompletion/revisited/AbstractASTManager.java @@ -1059,7 +1059,8 @@ public boolean isNodeTypingUnionSubscript(IModule module, Object node) { Subscript subscript = (Subscript) node; String rep = NodeUtils.getFullRepresentationString(subscript.value); if (rep != null && !rep.isBlank()) { - if (rep.equals("Union") || rep.endsWith(".Union")) { + if (rep.equals("Union") || rep.endsWith(".Union") || rep.equals("Annotated") + || rep.endsWith(".Annotated")) { return true; } }