Skip to content

Commit 0a6ffbf

Browse files
committed
fix: Python 3.9 and 3.10 compatibility
For some reasons list["Attribute"] is not valid in Python 3.10- but List["Attribute"] is.
1 parent 5ad82de commit 0a6ffbf

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scim2_models/rfc7643/schema.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from enum import Enum
44
from typing import Annotated
55
from typing import Any
6+
from typing import List # noqa : UP005
67
from typing import Literal
78
from typing import Optional
89
from typing import Union
@@ -196,7 +197,8 @@ def from_python(cls, pytype) -> str:
196197
"""A multi-valued array of JSON strings that indicate the SCIM resource
197198
types that may be referenced."""
198199

199-
sub_attributes: Annotated[Optional[list["Attribute"]], Mutability.read_only] = None
200+
# for python 3.9 and 3.10 compatibility, this should be 'list' and not 'List'
201+
sub_attributes: Annotated[Optional[List["Attribute"]], Mutability.read_only] = None # noqa: UP006
200202
"""When an attribute is of type "complex", "subAttributes" defines a set of
201203
sub-attributes."""
202204

0 commit comments

Comments
 (0)