Skip to content

Commit

Permalink
Make old Pythons happy
Browse files Browse the repository at this point in the history
  • Loading branch information
tyzhnenko committed Jan 21, 2024
1 parent 8890727 commit f769e15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blacksheep/server/openapi/v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def get_paths(self, app: Application, path_prefix: str = "") -> Dict[str, PathIt

def get_type_name_for_annotated(
self,
object_type: AnnotatedAlias,
object_type: "AnnotatedAlias",
context_type_args: Optional[Dict[Any, Type]] = None,
) -> str:
"""
Expand Down Expand Up @@ -771,7 +771,7 @@ def get_fields(self, object_type: Any) -> List[FieldInfo]:

def _try_get_schema_for_annotated(
self, object_type: Type, context_type_args: Optional[Dict[Any, Type]] = None
) -> Optional[Schema | Reference]:
) -> Optional[Union[Schema, Reference]]:
annotations = [child for child in getattr(object_type, "__metadata__", [])]
if len(annotations) == 1:
return self.get_schema_by_type(annotations[0], context_type_args)
Expand Down

0 comments on commit f769e15

Please sign in to comment.