@@ -220,7 +220,7 @@ def query_object_async(self, wavelength_range=None, wavelength_type='', waveleng
220
220
if upper_level_erange is not None :
221
221
upper_level_erange = upper_level_erange .to (
222
222
u .cm ** - 1 , equivalencies = u .spectral ()).value
223
- input = {
223
+ input_payload = {
224
224
'wavl' : ' ' .join (map (str , wlrange_in_angstroms )),
225
225
'wave' : 'Angstrom' ,
226
226
'air' : air ,
@@ -242,8 +242,8 @@ def query_object_async(self, wavelength_range=None, wavelength_type='', waveleng
242
242
'tptype' : 'as_a' ,
243
243
}
244
244
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 )
247
247
return response
248
248
249
249
def _parse_result (self , response ):
@@ -259,7 +259,7 @@ def _parse_result(self, response):
259
259
colnames = [colname .strip ('-' ).replace ('-' , ' ' )
260
260
for colname in header .split ('|' ) if colname .strip ()]
261
261
indices = [i for i , c in enumerate (header ) if c == '|' ]
262
- input = []
262
+ result_data = []
263
263
for line in data :
264
264
row = []
265
265
for start , end in zip ([0 ] + indices , indices + [None ]):
@@ -272,26 +272,26 @@ def _parse_result(self, response):
272
272
# maintain table dimensions when data missing
273
273
row .append ('None' )
274
274
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 ' ,
278
278
names = colnames , fast_reader = False )
279
279
else :
280
280
# return an empty table if the query yielded no results
281
281
return Table ()
282
282
283
- def _submit_form (self , input = None , cache = True ):
283
+ def _submit_form (self , input_data = None , cache = True ):
284
284
"""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
286
286
element's names and the values are their respective values).
287
287
288
288
"""
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
292
292
# 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 ():
295
295
if v is not None :
296
296
payload [k ] = v
297
297
url = self ._form_action_url
0 commit comments