Skip to content

Commit 9a81673

Browse files
committed
fix: Python 3.9 compatibility
1 parent ef2bac9 commit 9a81673

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scim2_models/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ def annotation_type_filter(item):
429429
return field_annotation
430430

431431
@classmethod
432-
def get_field_root_type(cls, attribute_name: str) -> type | None:
432+
def get_field_root_type(cls, attribute_name: str) -> Optional[type]:
433433
"""Extract the root type from a model field.
434434
435435
For example, return 'GroupMember' for

scim2_models/rfc7643/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def make_python_model(
4848
obj: Union["Schema", "Attribute"],
4949
base: Optional[type[BaseModel]] = None,
5050
multiple=False,
51-
) -> "Resource" | "Extension":
51+
) -> Union[Resource, Extension]:
5252
"""Build a Python model from a Schema or an Attribute object."""
5353
if isinstance(obj, Attribute):
5454
pydantic_attributes = {

0 commit comments

Comments
 (0)