@@ -188,7 +188,7 @@ def from_service(cls: Type['Tool'], service: 'Service') -> 'Tool':
188188 )
189189
190190
191- class ToolsRepository :
191+ class ToolRepository :
192192 """
193193 The repository of tool formats
194194 """
@@ -251,7 +251,7 @@ def __bool__(self) -> bool:
251251 or len (self ._services ) > 0
252252
253253 def __eq__ (self , other : object ) -> bool :
254- if not isinstance (other , ToolsRepository ):
254+ if not isinstance (other , ToolRepository ):
255255 return False
256256
257257 return self ._tools == other ._tools \
@@ -262,10 +262,10 @@ def __hash__(self) -> int:
262262 return hash ((tuple (self ._tools ), tuple (self ._components ), tuple (self ._services )))
263263
264264
265- class _ToolsRepositoryHelper (BaseHelper ):
265+ class _ToolRepositoryHelper (BaseHelper ):
266266
267267 @staticmethod
268- def __all_as_tools (o : ToolsRepository ) -> Tuple [Tool , ...]:
268+ def __all_as_tools (o : ToolRepository ) -> Tuple [Tool , ...]:
269269 return (
270270 * o .tools ,
271271 * map (Tool .from_component , o .components ),
@@ -280,7 +280,7 @@ def __supports_components_and_services(view: Any) -> bool:
280280 return False
281281
282282 @classmethod
283- def json_normalize (cls , o : ToolsRepository , * ,
283+ def json_normalize (cls , o : ToolRepository , * ,
284284 view : Optional [Type ['ViewType' ]],
285285 ** __ : Any ) -> Any :
286286 if len (o .tools ) > 0 or not cls .__supports_components_and_services (view ):
@@ -294,7 +294,7 @@ def json_normalize(cls, o: ToolsRepository, *,
294294
295295 @classmethod
296296 def json_denormalize (cls , o : Union [List [Dict [str , Any ]], Dict [str , Any ]],
297- ** __ : Any ) -> ToolsRepository :
297+ ** __ : Any ) -> ToolRepository :
298298 tools = None
299299 components = None
300300 services = None
@@ -305,10 +305,10 @@ def json_denormalize(cls, o: Union[List[Dict[str, Any]], Dict[str, Any]],
305305 s ), o .get ('services' , ()))
306306 elif isinstance (o , Iterable ):
307307 tools = map (lambda t : Tool .from_json (t ), o ) # type:ignore[attr-defined]
308- return ToolsRepository (components = components , services = services , tools = tools )
308+ return ToolRepository (components = components , services = services , tools = tools )
309309
310310 @classmethod
311- def xml_normalize (cls , o : ToolsRepository , * ,
311+ def xml_normalize (cls , o : ToolRepository , * ,
312312 element_name : str ,
313313 view : Optional [Type ['ViewType' ]],
314314 xmlns : Optional [str ],
@@ -344,7 +344,7 @@ def xml_denormalize(cls, o: Element, *,
344344 default_ns : Optional [str ],
345345 prop_info : 'ObjectMetadataLibrary.SerializableProperty' ,
346346 ctx : Type [Any ],
347- ** kwargs : Any ) -> ToolsRepository :
347+ ** kwargs : Any ) -> ToolRepository :
348348 tools = []
349349 components = None
350350 services = None
@@ -361,7 +361,7 @@ def xml_denormalize(cls, o: Element, *,
361361 s , default_ns ), e )
362362 else :
363363 raise CycloneDxDeserializationException (f'unexpected: { e !r} ' )
364- return ToolsRepository (
364+ return ToolRepository (
365365 tools = tools ,
366366 components = components ,
367367 services = services )
0 commit comments