You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""A single keyword indicating the circumstances under which the value of
302
-
the attribute can be (re)defined:"""
299
+
"""A single keyword indicating the circumstances under which the value of the attribute can be (re)defined."""
303
300
304
301
read_only="readOnly"
305
302
"""The attribute SHALL NOT be modified."""
@@ -326,9 +323,7 @@ class Mutability(str, Enum):
326
323
327
324
328
325
classReturned(str, Enum):
329
-
"""A single keyword that indicates when an attribute and associated values
330
-
are returned in response to a GET request or in response to a PUT, POST, or
331
-
PATCH request."""
326
+
"""A single keyword that indicates when an attribute and associated values are returned in response to a GET request or in response to a PUT, POST, or PATCH request."""
332
327
333
328
always="always"# cannot be excluded
334
329
"""The attribute is always returned, regardless of the contents of the
@@ -353,8 +348,7 @@ class Returned(str, Enum):
353
348
354
349
355
350
classUniqueness(str, Enum):
356
-
"""A single keyword value that specifies how the service provider enforces
357
-
uniqueness of attribute values."""
351
+
"""A single keyword value that specifies how the service provider enforces uniqueness of attribute values."""
358
352
359
353
none="none"
360
354
"""The values are not intended to be unique in any way."""
@@ -393,8 +387,7 @@ def __bool__(self):
393
387
394
388
395
389
classCaseExact(Enum):
396
-
"""A Boolean value that specifies whether a string attribute is case-
397
-
sensitive or not."""
390
+
"""A Boolean value that specifies whether a string attribute is case- sensitive or not."""
398
391
399
392
true=True
400
393
false=False
@@ -421,8 +414,7 @@ class BaseModel(PydanticBaseModel):
"""Check and fix that the field mutability is expected according to the
466
-
requests validation context, as defined in :rfc:`RFC7643 §7
467
-
<7653#section-7>`."""
468
-
456
+
"""Check and fix that the field mutability is expected according to the requests validation context, as defined in :rfc:`RFC7643 §7 <7653#section-7>`."""
"""Navigate through attributes and sub-attributes of type
613
-
ComplexAttribute, and mark them with a '_schema' attribute.
614
-
615
-
'_schema' will later be used by 'get_attribute_urn'.
616
-
"""
617
-
595
+
"""Navigate through attributes and sub-attributes of type ComplexAttribute, and mark them with a '_schema' attribute. '_schema' will later be used by 'get_attribute_urn'."""
618
596
fromscim2_models.rfc7643.resourceimportResource
619
597
620
598
forfield_name, fieldinself.model_fields.items():
@@ -644,9 +622,7 @@ def scim_serializer(
644
622
handler: SerializerFunctionWrapHandler,
645
623
info: SerializationInfo,
646
624
) ->Any:
647
-
"""Serialize the fields according to mutability indications passed in
648
-
the serialization context."""
649
-
625
+
"""Serialize the fields according to mutability indications passed in the serialization context."""
Copy file name to clipboardExpand all lines: scim2_models/rfc7643/resource.py
+9-30Lines changed: 9 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -27,13 +27,9 @@
27
27
28
28
29
29
classMeta(ComplexAttribute):
30
-
"""All "meta" sub-attributes are assigned by the service provider (have a
31
-
"mutability" of "readOnly"), and all of these sub-attributes have a
32
-
"returned" characteristic of "default".
30
+
"""All "meta" sub-attributes are assigned by the service provider (have a "mutability" of "readOnly"), and all of these sub-attributes have a "returned" characteristic of "default".
33
31
34
-
This attribute SHALL be
35
-
ignored when provided by clients. "meta" contains the following
36
-
sub-attributes:
32
+
This attribute SHALL be ignored when provided by clients. "meta" contains the following sub-attributes:
37
33
"""
38
34
39
35
resource_type: Optional[str] =None
@@ -84,16 +80,12 @@ class Meta(ComplexAttribute):
84
80
classExtension(BaseModel):
85
81
@classmethod
86
82
defto_schema(cls):
87
-
"""Build a :class:`~scim2_models.Schema` from the current extension
88
-
class."""
89
-
83
+
"""Build a :class:`~scim2_models.Schema` from the current extension class."""
90
84
returnmodel_to_schema(cls)
91
85
92
86
@classmethod
93
87
deffrom_schema(cls, schema) ->"Extension":
94
-
"""Build a :class:`~scim2_models.Extension` subclass from the schema
95
-
definition."""
96
-
88
+
"""Build a :class:`~scim2_models.Extension` subclass from the schema definition."""
0 commit comments