Skip to content

Commit e1b9bc6

Browse files
nkphysicsbsipocz
authored andcommitted
Refactor: Made hitran kwargs keyword only
1 parent f7ead30 commit e1b9bc6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

astroquery/hitran/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def __init__(self, **kwargs):
151151
"""
152152
super().__init__()
153153

154-
def _args_to_payload(self, molecule_number=1, isotopologue_number=1,
154+
def _args_to_payload(self, *, molecule_number=1, isotopologue_number=1,
155155
min_frequency=None, max_frequency=None):
156156
"""
157157
Code to parse input and construct the payload dictionary.
@@ -199,7 +199,7 @@ def _args_to_payload(self, molecule_number=1, isotopologue_number=1,
199199
return payload
200200

201201
@prepend_docstr_nosections("\n" + _args_to_payload.__doc__)
202-
def query_lines_async(self, get_query_payload=False, cache=True, **kwargs):
202+
def query_lines_async(self, *, get_query_payload=False, cache=True, **kwargs):
203203
"""
204204
Queries Hitran class for a particular molecule with default arguments
205205
set. Based on fetch function from hapi.py.
@@ -223,7 +223,7 @@ def query_lines_async(self, get_query_payload=False, cache=True, **kwargs):
223223

224224
return response
225225

226-
def _parse_result(self, response, verbose=False):
226+
def _parse_result(self, response, *, verbose=False):
227227
"""
228228
Parse a response into an `~astropy.table.Table`
229229
"""

astroquery/hitran/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
'F': float}
88

99

10-
def parse_readme(filename, group_global=None, group_local=None):
10+
def parse_readme(filename, *, group_global=None, group_local=None):
1111
with open(filename, 'r') as f:
1212
lines = f.readlines()
1313

@@ -51,7 +51,7 @@ def parse_readme(filename, group_global=None, group_local=None):
5151
return formats
5252

5353

54-
def quanta_formatter(group_global='class1', group_local='group1'):
54+
def quanta_formatter(*, group_global='class1', group_local='group1'):
5555
"""
5656
Format based on the global/local formatters from the HITRAN04 paper
5757
"""

0 commit comments

Comments
 (0)