Skip to content

Commit aa922df

Browse files
nkphysicsbsipocz
authored andcommitted
Refactor: Made casda kwargs keyword only
1 parent 5170354 commit aa922df

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

astroquery/casda/core.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def _login(self, *, username=None, store_password=False,
9595

9696
return authenticated
9797

98-
def query_region_async(self, coordinates, radius=1*u.arcmin, height=None, width=None,
98+
def query_region_async(self, coordinates, *, radius=1*u.arcmin, height=None, width=None,
9999
get_query_payload=False, cache=True):
100100
"""
101101
Queries a region around the specified coordinates. Either a radius or both a height and a width
@@ -135,7 +135,7 @@ def query_region_async(self, coordinates, radius=1*u.arcmin, height=None, width=
135135

136136
# Create the dict of HTTP request parameters by parsing the user
137137
# entered values.
138-
def _args_to_payload(self, radius=1*u.arcmin, **kwargs):
138+
def _args_to_payload(self, *, radius=1*u.arcmin, **kwargs):
139139
request_payload = dict()
140140

141141
# Convert the coordinates to FK5
@@ -206,7 +206,7 @@ def _args_to_payload(self, radius=1*u.arcmin, **kwargs):
206206
# the methods above implicitly call the private _parse_result method.
207207
# This should parse the raw HTTP response and return it as
208208
# an `astropy.table.Table`.
209-
def _parse_result(self, response, verbose=False):
209+
def _parse_result(self, response, *, verbose=False):
210210
# if verbose is False then suppress any VOTable related warnings
211211
if not verbose:
212212
commons.suppress_vo_warnings()
@@ -284,7 +284,7 @@ def _complete_job(self, job_url, verbose):
284284

285285
return fileurls
286286

287-
def stage_data(self, table, verbose=False):
287+
def stage_data(self, table, *, verbose=False):
288288
"""
289289
Request access to a set of data files. All requests for data must use authentication. If you have access to the
290290
data, the requested files will be brought online and a set of URLs to download the files will be returned.
@@ -367,7 +367,7 @@ def cutout(self, table, *, coordinates=None, radius=1*u.arcmin, height=None,
367367

368368
return self._complete_job(job_url, verbose)
369369

370-
def download_files(self, urls, savedir=''):
370+
def download_files(self, urls, *, savedir=''):
371371
"""
372372
Download a series of files
373373
@@ -445,7 +445,7 @@ def _parse_datalink_for_service_and_id(self, response, service_name):
445445

446446
return async_url, authenticated_id_token
447447

448-
def _create_soda_job(self, authenticated_id_tokens, soda_url=None):
448+
def _create_soda_job(self, authenticated_id_tokens, *, soda_url=None):
449449
"""
450450
Creates the async job, returning the url to query the job status and details
451451
@@ -488,7 +488,7 @@ def _add_cutout_params(self, job_location, verbose, cutout_spec):
488488
resp = self._request('POST', job_location + '/parameters', data=cutout_spec, cache=False)
489489
resp.raise_for_status()
490490

491-
def _run_job(self, job_location, verbose, poll_interval=20):
491+
def _run_job(self, job_location, verbose, *, poll_interval=20):
492492
"""
493493
Start an async job (e.g. TAP or SODA) and wait for it to be completed.
494494

0 commit comments

Comments
 (0)