@@ -18,7 +18,7 @@ def __init__(self,
18
18
api : str ,
19
19
download : bool = True ,
20
20
verbose : bool = False ,
21
- * args : str , * *kwds : str
21
+ ** kwds : str
22
22
) -> None :
23
23
"""Class intended as base class for superclasses.
24
24
@@ -28,7 +28,6 @@ def __init__(self,
28
28
:param download: Whether to download the query or not. Has no effect
29
29
for retrieval requests.
30
30
:param verbose: Whether to print a download progress bar.
31
- :param args: Keywords passed on `get_content()`
32
31
:param kwds: Keywords passed on `get_content()`
33
32
34
33
Raises
@@ -63,12 +62,12 @@ def __init__(self,
63
62
else :
64
63
self ._json = loads (fname .read_text ())
65
64
else :
66
- resp = get_content (url , api , params , * args , * *kwds )
65
+ resp = get_content (url , api , params , ** kwds )
67
66
header = resp .headers
68
67
69
68
if ab_ref_retrieval :
70
69
kwds ['startref' ] = '1'
71
- data = _get_all_refs (url , params , verbose , resp , * args , * *kwds )
70
+ data = _get_all_refs (url , params , verbose , resp , ** kwds )
72
71
self ._json = data
73
72
data = [data ]
74
73
elif search_request :
@@ -104,7 +103,7 @@ def __init__(self,
104
103
else :
105
104
start += params ["size" ]
106
105
params .update ({'start' : start })
107
- resp = get_content (url , api , params , * args , * *kwds )
106
+ resp = get_content (url , api , params , ** kwds )
108
107
res = resp .json ()
109
108
data .extend (res .get ('search-results' , {}).get ('entry' , []))
110
109
header = resp .headers # Use header of final call
@@ -168,7 +167,7 @@ def _check_file_age(self):
168
167
return refresh , mod_ts
169
168
170
169
171
- def _get_all_refs (url : str , params : dict , verbose : bool , resp : dict , * args , * *kwds ) -> dict :
170
+ def _get_all_refs (url : str , params : dict , verbose : bool , resp : dict , ** kwds ) -> dict :
172
171
"""Get all references for `AbstractRetrieval` with view `REF`."""
173
172
# startref starts at 1 (0 does not work)
174
173
# Max refs per query are 40
@@ -191,7 +190,7 @@ def _get_all_refs(url: str, params: dict, verbose: bool, resp: dict, *args, **kw
191
190
# Increment startref
192
191
kwds ['startref' ] = str (int (kwds ['startref' ]) + ref_len )
193
192
# Get
194
- resp = get_content (url , 'AbstractRetrieval' , params , * args , * *kwds )
193
+ resp = get_content (url , 'AbstractRetrieval' , params , ** kwds )
195
194
res = resp .json ()
196
195
res = parse_content .chained_get (res , path_reference )
197
196
# Append
0 commit comments