Skip to content

Commit 0207f46

Browse files
nkphysicsbsipocz
authored andcommitted
Refactor: Made lamda kwargs keyword only
1 parent 2b516fd commit 0207f46

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

astroquery/lamda/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(self, **kwargs):
4545
self.moldict_path = os.path.join(self.cache_location,
4646
"molecules.json")
4747

48-
def _get_molfile(self, mol, cache=True, timeout=None):
48+
def _get_molfile(self, mol, *, cache=True, timeout=None):
4949
"""
5050
"""
5151
if mol not in self.molecule_dict:
@@ -65,7 +65,7 @@ def download_molfile(self, mol, outfilename):
6565
with open(outfilename, 'w') as f:
6666
f.write(molreq.text)
6767

68-
def query(self, mol, return_datafile=False, cache=True, timeout=None):
68+
def query(self, mol, *, return_datafile=False, cache=True, timeout=None):
6969
"""
7070
Query the LAMDA database.
7171
@@ -107,7 +107,7 @@ def query(self, mol, return_datafile=False, cache=True, timeout=None):
107107
tables = parse_lamda_lines(datafile)
108108
return tables
109109

110-
def get_molecules(self, cache=True):
110+
def get_molecules(self, *, cache=True):
111111
"""
112112
Scrape the list of valid molecules
113113
"""
@@ -152,7 +152,7 @@ def molecule_dict(self):
152152

153153
return self._molecule_dict
154154

155-
def _find_datfiles(self, url, base_url, raise_for_status=False):
155+
def _find_datfiles(self, url, base_url, *, raise_for_status=False):
156156

157157
myurl = _absurl_from_url(url, base_url)
158158
if 'http' not in myurl:

astroquery/lamda/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from astropy import units as u
55

66

7-
def ncrit(lamda_tables, transition_upper, transition_lower, temperature, OPR=3,
7+
def ncrit(lamda_tables, transition_upper, transition_lower, temperature, *, OPR=3,
88
partners=['H2', 'OH2', 'PH2']):
99
"""
1010
Compute the critical density for a transition given its temperature.

0 commit comments

Comments
 (0)