Skip to content

Commit 7d5b5ab

Browse files
committed
MNT: Avoid overriding builtin python functions
1 parent 2c68dd0 commit 7d5b5ab

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

astroquery/atomic/core.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def query_object_async(self, wavelength_range=None, wavelength_type='', waveleng
220220
if upper_level_erange is not None:
221221
upper_level_erange = upper_level_erange.to(
222222
u.cm ** -1, equivalencies=u.spectral()).value
223-
input = {
223+
input_payload = {
224224
'wavl': ' '.join(map(str, wlrange_in_angstroms)),
225225
'wave': 'Angstrom',
226226
'air': air,
@@ -242,8 +242,8 @@ def query_object_async(self, wavelength_range=None, wavelength_type='', waveleng
242242
'tptype': 'as_a',
243243
}
244244
if get_query_payload:
245-
return input
246-
response = self._submit_form(input, cache=cache)
245+
return input_payload
246+
response = self._submit_form(input_payload, cache=cache)
247247
return response
248248

249249
def _parse_result(self, response):
@@ -259,7 +259,7 @@ def _parse_result(self, response):
259259
colnames = [colname.strip('-').replace('-', ' ')
260260
for colname in header.split('|') if colname.strip()]
261261
indices = [i for i, c in enumerate(header) if c == '|']
262-
input = []
262+
result_data = []
263263
for line in data:
264264
row = []
265265
for start, end in zip([0] + indices, indices + [None]):
@@ -272,26 +272,26 @@ def _parse_result(self, response):
272272
# maintain table dimensions when data missing
273273
row.append('None')
274274
if row:
275-
input.append('\t'.join(row))
276-
if input:
277-
return ascii.read(input, data_start=0, delimiter='\t',
275+
result_data.append('\t'.join(row))
276+
if result_data:
277+
return ascii.read(result_data, data_start=0, delimiter='\t',
278278
names=colnames, fast_reader=False)
279279
else:
280280
# return an empty table if the query yielded no results
281281
return Table()
282282

283-
def _submit_form(self, input=None, cache=True):
283+
def _submit_form(self, input_data=None, cache=True):
284284
"""Fill out the form of the SkyView site and submit it with the
285-
values given in `input` (a dictionary where the keys are the form
285+
values given in ``input_data`` (a dictionary where the keys are the form
286286
element's names and the values are their respective values).
287287
288288
"""
289-
if input is None:
290-
input = {}
291-
# only overwrite payload's values if the `input` value is not None
289+
if input_data is None:
290+
input_data = {}
291+
# only overwrite payload's values if the ``input_data`` value is not None
292292
# to avoid overwriting of the form's default values
293-
payload = self._default_form_values.copy()
294-
for k, v in input.items():
293+
payload = self.__default_form_values.copy()
294+
for k, v in input_data.items():
295295
if v is not None:
296296
payload[k] = v
297297
url = self._form_action_url

0 commit comments

Comments
 (0)