Skip to content

Commit e599f53

Browse files
committed
fix: pre-commit
1 parent 7c18ff3 commit e599f53

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

scim2_client/client.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import sys
33
from collections.abc import Collection
44
from dataclasses import dataclass
5-
from typing import Any
65
from typing import Optional
76
from typing import TypeVar
87
from typing import Union
@@ -206,7 +205,7 @@ def get_resource_model(self, name: str) -> Optional[type[Resource]]:
206205
def _check_resource_model(
207206
self, resource_model: type[Resource], payload=None
208207
) -> None:
209-
# We need to check the actual schema names, comapring the class
208+
# We need to check the actual schema names, comparing the class
210209
# types does not work because if the resource_models are
211210
# discovered. The classes might differ:
212211
# <class 'scim2_models.rfc7643.user.User'> vs <class 'scim2_models.rfc7643.schema.User'>
@@ -216,9 +215,7 @@ def _check_resource_model(
216215
if schema_to_check == schema:
217216
return
218217

219-
if (
220-
resource_model not in CONFIG_RESOURCES
221-
):
218+
if resource_model not in CONFIG_RESOURCES:
222219
raise SCIMRequestError(
223220
f"Unknown resource type: '{resource_model}'", source=payload
224221
)
@@ -650,7 +647,7 @@ def build_resource_models(
650647
for schema, resource_type in resource_types_by_schema.items():
651648
schema_obj = schema_objs_by_schema[schema]
652649
model = Resource.from_schema(schema_obj)
653-
extensions: tuple[Any, ...] = ()
650+
extensions: tuple[type[Extension], ...] = ()
654651
for ext_schema in resource_type.schema_extensions or []:
655652
schema_obj = schema_objs_by_schema[ext_schema.schema_]
656653
extension = Extension.from_schema(schema_obj)

tests/test_discovery.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,7 @@ def test_discovery_resource_types_multiple_extensions(server):
9090
assert scim_client.get_resource_model("Group")
9191

9292
# Try to create a user to see if discover filled everything correctly
93-
user_request = User[Union[EnterpriseUser, OtherExtension]](user_name="bjensen@example.com")
93+
user_request = User[Union[EnterpriseUser, OtherExtension]](
94+
user_name="bjensen@example.com"
95+
)
9496
scim_client.create(user_request)

0 commit comments

Comments
 (0)