@@ -25,11 +25,7 @@ def items(self):
2525 return self ._items
2626
2727 def __eq__ (self , other ):
28- return (
29- self .count == other .count
30- and self .last == other .last
31- and self .items == other .items
32- )
28+ return self .count == other .count and self .last == other .last and self .items == other .items
3329
3430
3531class Util :
@@ -111,9 +107,7 @@ def insert(self, data: typing.Union[dict, list, str, int, bool], key: str = None
111107 if key :
112108 data ["key" ] = key
113109
114- code , res = self ._request (
115- "/items" , "POST" , {"item" : data }, content_type = JSON_MIME
116- )
110+ code , res = self ._request ("/items" , "POST" , {"item" : data }, content_type = JSON_MIME )
117111 if code == 201 :
118112 return res
119113 elif code == 409 :
@@ -133,9 +127,7 @@ def put(self, data: typing.Union[dict, list, str, int, bool], key: str = None):
133127 if key :
134128 data ["key" ] = key
135129
136- code , res = self ._request (
137- "/items" , "PUT" , {"items" : [data ]}, content_type = JSON_MIME
138- )
130+ code , res = self ._request ("/items" , "PUT" , {"items" : [data ]}, content_type = JSON_MIME )
139131 return res ["processed" ]["items" ][0 ] if res and code == 207 else None
140132
141133 def put_many (self , items : typing .List [typing .Union [dict , list , str , int , bool ]]):
@@ -147,9 +139,7 @@ def put_many(self, items: typing.List[typing.Union[dict, list, str, int, bool]])
147139 else :
148140 _items .append (i )
149141
150- _ , res = self ._request (
151- "/items" , "PUT" , {"items" : _items }, content_type = JSON_MIME
152- )
142+ _ , res = self ._request ("/items" , "PUT" , {"items" : _items }, content_type = JSON_MIME )
153143 return res
154144
155145 def _fetch (
0 commit comments