From e3fa2d0b678286583c7860a75dd3eae6cb3e8893 Mon Sep 17 00:00:00 2001 From: Michael Panchenko Date: Sat, 3 Jan 2026 19:28:53 +0700 Subject: [PATCH] Fixed NotRequired vs None annotations in jetbrain_types.py --- src/serena/tools/jetbrain_types.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/serena/tools/jetbrain_types.py b/src/serena/tools/jetbrain_types.py index 5ec12e00..d7646bd9 100644 --- a/src/serena/tools/jetbrain_types.py +++ b/src/serena/tools/jetbrain_types.py @@ -18,24 +18,24 @@ class SymbolDTO(TypedDict): relative_path: str type: str body: str - quick_info: NotRequired[str | None] + quick_info: NotRequired[str] """Quick info text (e.g., type signature) for the symbol, as HTML string.""" - documentation: NotRequired[str | None] + documentation: NotRequired[str] """Documentation text for the symbol (if available), as HTML string.""" text_range: TextRangeDTO - children: list["SymbolDTO"] | None + children: NotRequired[list["SymbolDTO"]] class SymbolCollectionResponse(TypedDict): symbols: list[SymbolDTO] - documentation: NotRequired[str | None] + documentation: NotRequired[str] """Docstring of the collection (if applicable - usually present only if the collection is from a single file), as HTML string.""" class TypeHierarchyNode(TypedDict): symbol: SymbolDTO - children: list["TypeHierarchyNode"] | None + children: NotRequired[list["TypeHierarchyNode"]] class TypeHierarchy(TypedDict): @@ -44,7 +44,7 @@ class TypeHierarchy(TypedDict): class TypeHierarchyResponse(TypedDict): - symbol: SymbolDTO | None - hierarchy: list[TypeHierarchyNode] | None - error: str | None - num_levels_not_included: int | None + symbol: NotRequired[SymbolDTO] + hierarchy: NotRequired[list[TypeHierarchyNode]] + error: NotRequired[str] + num_levels_not_included: NotRequired[int]