22import sys
33from collections .abc import Collection
44from dataclasses import dataclass
5- from typing import Any
65from typing import Optional
76from typing import TypeVar
87from 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 )
0 commit comments