Skip to content

Commit 4943abb

Browse files
nkphysicsbsipocz
authored andcommitted
Refactor: Made nasa_ads kwargs keyword only
1 parent e33d24e commit 4943abb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

astroquery/nasa_ads/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ def __init__(self, *args):
4040
super().__init__()
4141

4242
@class_or_instance
43-
def query_simple(self, query_string, get_query_payload=False,
43+
def query_simple(self, query_string, *, get_query_payload=False,
4444
get_raw_response=False, cache=True):
4545
"""
4646
Basic query. Uses a string and the ADS generic query.
4747
"""
4848
request_string = self._args_to_url(query_string)
4949
request_fields = self._fields_to_url()
5050
request_sort = self._sort_to_url()
51-
request_rows = self._rows_to_url(self.NROWS, self.NSTART)
51+
request_rows = self._rows_to_url(nrows=self.NROWS, nstart=self.NSTART)
5252
request_url = self.QUERY_SIMPLE_URL + request_string + request_fields + request_sort + request_rows
5353

5454
# primarily for debug purposes, but also useful if you want to send
@@ -101,7 +101,7 @@ def _sort_to_url(self):
101101
request_sort = '&sort=' + urlencode(self.SORT)
102102
return request_sort
103103

104-
def _rows_to_url(self, nrows=10, nstart=0):
104+
def _rows_to_url(self, *, nrows=10, nstart=0):
105105
request_rows = '&rows=' + str(nrows) + '&start=' + str(nstart)
106106
return request_rows
107107

astroquery/nasa_ads/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
def _get_data_from_xml(doclist, fieldname, nohitreturn=None):
3+
def _get_data_from_xml(doclist, fieldname, *, nohitreturn=None):
44
"""Get the fieldname (i.e. author, title etc)
55
from minidom.parseString().childNodes[0].childNodes list
66
"""

0 commit comments

Comments
 (0)