@@ -16,17 +16,23 @@ class CategoryQuerySchema(abstract.AbstractQuerySchema):
1616
1717
1818class CategoryService (abstract .AbstractService ):
19- def get_by_id (self , id : str , expand : OptionalListStr = None ) -> Optional [types .Category ]:
19+ def get_by_id (
20+ self , id : str , expand : OptionalListStr = None
21+ ) -> Optional [types .Category ]:
2022 query_params = {}
2123 if expand :
2224 query_params ["expand" ] = expand
23- return self ._client ._get (f"categories/{ id } " , query_params , schemas .CategorySchema )
25+ return self ._client ._get (
26+ f"categories/{ id } " , query_params , schemas .CategorySchema
27+ )
2428
2529 def get_by_key (self , key : str , expand : OptionalListStr = None ) -> types .Category :
2630 query_params = {}
2731 if expand :
2832 query_params ["expand" ] = expand
29- return self ._client ._get (f"categories/key={ key } " , query_params , schemas .CategorySchema )
33+ return self ._client ._get (
34+ f"categories/key={ key } " , query_params , schemas .CategorySchema
35+ )
3036
3137 def query (
3238 self ,
@@ -49,12 +55,18 @@ def query(
4955 "categories" , params , schemas .CategoryPagedQueryResponseSchema
5056 )
5157
52- def create (self , draft : types .CategoryDraft , expand : OptionalListStr = None ) -> types .Category :
58+ def create (
59+ self , draft : types .CategoryDraft , expand : OptionalListStr = None
60+ ) -> types .Category :
5361 query_params = {}
5462 if expand :
5563 query_params ["expand" ] = expand
5664 return self ._client ._post (
57- "categories" , query_params , draft , schemas .CategoryDraftSchema , schemas .CategorySchema
65+ "categories" ,
66+ query_params ,
67+ draft ,
68+ schemas .CategoryDraftSchema ,
69+ schemas .CategorySchema ,
5870 )
5971
6072 def update_by_id (
@@ -102,7 +114,12 @@ def update_by_key(
102114 )
103115
104116 def delete_by_id (
105- self , id : str , version : int , expand : OptionalListStr = None , * , force_delete : bool = True
117+ self ,
118+ id : str ,
119+ version : int ,
120+ expand : OptionalListStr = None ,
121+ * ,
122+ force_delete : bool = True ,
106123 ) -> types .Category :
107124 params = {"version" : version }
108125 if expand :
@@ -116,7 +133,12 @@ def delete_by_id(
116133 )
117134
118135 def delete_by_key (
119- self , key : str , version : int , expand : OptionalListStr = None , * , force_delete : bool = True
136+ self ,
137+ key : str ,
138+ version : int ,
139+ expand : OptionalListStr = None ,
140+ * ,
141+ force_delete : bool = True ,
120142 ) -> types .Category :
121143 params = {"version" : version }
122144 if expand :
0 commit comments