Skip to content

Commit df75583

Browse files
author
Wizard1209
committed
revert
1 parent a267f1a commit df75583

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dipdup/indexes/tezos_operations/parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def extract_root_outer_type(storage_type: type[BaseModel]) -> type[BaseModel]:
2727
"""Extract Pydantic __root__ type"""
2828
root_field = storage_type.model_fields['root']
2929
if not root_field.is_required():
30-
# NOTE: Optional is a magic _SpecialForm
31-
return cast('type[BaseModel]', Optional[root_field.annotation]) # noqa: UP007
30+
# NOTE: Optional is a magic _SpecialForm that handles None/Union edge cases
31+
return cast('type[BaseModel]', Optional[root_field.annotation]) # noqa: UP045
3232

3333
return root_field.annotation # type: ignore[return-value]
3434

0 commit comments

Comments
 (0)