We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a267f1a commit df75583Copy full SHA for df75583
src/dipdup/indexes/tezos_operations/parser.py
@@ -27,8 +27,8 @@ def extract_root_outer_type(storage_type: type[BaseModel]) -> type[BaseModel]:
27
"""Extract Pydantic __root__ type"""
28
root_field = storage_type.model_fields['root']
29
if not root_field.is_required():
30
- # NOTE: Optional is a magic _SpecialForm
31
- return cast('type[BaseModel]', Optional[root_field.annotation]) # noqa: UP007
+ # NOTE: Optional is a magic _SpecialForm that handles None/Union edge cases
+ return cast('type[BaseModel]', Optional[root_field.annotation]) # noqa: UP045
32
33
return root_field.annotation # type: ignore[return-value]
34
0 commit comments