Skip to content

Commit 0ec2e7e

Browse files
nkphysicsbsipocz
authored andcommitted
Refactor: Made svo_fps optional kwargs keyword only
1 parent ba1a647 commit 0ec2e7e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

astroquery/svo_fps/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class SvoFpsClass(BaseQuery):
3131
SVO_MAIN_URL = conf.base_url
3232
TIMEOUT = conf.timeout
3333

34-
def data_from_svo(self, query, cache=True, timeout=None,
34+
def data_from_svo(self, query, *, cache=True, timeout=None,
3535
error_msg='No data found for requested query'):
3636
"""Get data in response to the query send to SVO FPS.
3737
This method is not generally intended for users, but it can be helpful
@@ -128,7 +128,7 @@ def get_transmission_data(self, filter_id, **kwargs):
128128
error_msg = 'No filter found for requested Filter ID'
129129
return self.data_from_svo(query=query, error_msg=error_msg, **kwargs)
130130

131-
def get_filter_list(self, facility, instrument=None, **kwargs):
131+
def get_filter_list(self, facility, *, instrument=None, **kwargs):
132132
"""Get filters data for requested facilty and instrument from SVO
133133
134134
Parameters

astroquery/svo_fps/tests/test_svo_fps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def test_get_transmission_data(patch_get):
7979

8080

8181
def test_get_filter_list(patch_get):
82-
table = SvoFps.get_filter_list(TEST_FACILITY, TEST_INSTRUMENT)
82+
table = SvoFps.get_filter_list(TEST_FACILITY, instrument=TEST_INSTRUMENT)
8383
# Check if column for Filter ID (named 'filterID') exists in table
8484
assert 'filterID' in table.colnames
8585

astroquery/svo_fps/tests/test_svo_fps_remote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_get_transmission_data(self, test_filter_id):
2626
@pytest.mark.parametrize('test_facility, test_instrument',
2727
[('HST', 'WFPC2'), ('Keck', None)])
2828
def test_get_filter_list(self, test_facility, test_instrument):
29-
table = SvoFps.get_filter_list(test_facility, test_instrument)
29+
table = SvoFps.get_filter_list(test_facility, instrument=test_instrument)
3030
# Check if column for Filter ID (named 'filterID') exists in table
3131
assert 'filterID' in table.colnames
3232

0 commit comments

Comments
 (0)