Skip to content

Commit 3717944

Browse files
committed
Merge pull request #552 from bsipocz/docs_fix_spelling
Fix typos and remove unused imports
2 parents 12a7999 + 3f4d997 commit 3717944

File tree

31 files changed

+156
-163
lines changed

31 files changed

+156
-163
lines changed

astroquery/alma/core.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22
from __future__ import print_function
33
import time
4-
import sys
54
import os.path
6-
import webbrowser
75
import getpass
8-
import warnings
96
import keyring
107
import numpy as np
118
import re
@@ -16,20 +13,19 @@
1613
from bs4 import BeautifulSoup
1714

1815
from astropy.extern.six.moves.urllib_parse import urljoin
19-
from astropy.extern.six import BytesIO,iteritems
16+
from astropy.extern.six import iteritems
2017
from astropy.extern import six
2118
from astropy.table import Table, Column
2219
from astropy import log
2320
from astropy.utils.console import ProgressBar
2421
from astropy import units as u
2522
import astropy.io.votable as votable
2623

27-
from ..exceptions import (LoginError, RemoteServiceError, TableParseError,
24+
from ..exceptions import (RemoteServiceError, TableParseError,
2825
InvalidQueryError)
29-
from ..utils import schema, system_tools
30-
from ..utils import commons
26+
from ..utils import commons, system_tools
3127
from ..utils.process_asyncs import async_to_sync
32-
from ..query import BaseQuery, QueryWithLogin, suspend_cache
28+
from ..query import QueryWithLogin
3329
from . import conf
3430

3531
__doctest_skip__ = ['AlmaClass.*']
@@ -140,13 +136,13 @@ def query_async(self, payload, cache=True, public=True, science=True):
140136
response.raise_for_status()
141137

142138
return response
143-
139+
144140
def validate_query(self, payload, cache=True):
145141
"""
146142
Use the ALMA query validator service to check whether the keywords are
147143
valid
148144
"""
149-
145+
150146
# Check that the keywords specified are allowed
151147
self._validate_payload(payload)
152148

@@ -606,7 +602,7 @@ def download_and_extract_files(self, urls, delete=True, regex='.*\.fits$',
606602
"A partially completed download list is "
607603
"in Alma.partial_file_list")
608604
raise ex
609-
605+
610606
fitsfilelist = self.get_files_from_tarballs([tarball_name],
611607
regex=regex, path=path,
612608
verbose=verbose)
@@ -806,7 +802,7 @@ def _parse_staging_request_page(self, data_list_page):
806802
else 1)
807803
try:
808804
columns['size'].append(float(size)*u.Unit(unit))
809-
except ValueError:
805+
except ValueError:
810806
# size is probably a string?
811807
columns['size'].append(-1*u.byte)
812808
log.log(level=5, msg="Found a new-style entry. "

astroquery/atomic/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def _get_default_form_values(self, form):
280280
# ignore the submit and reset buttons
281281
if elem.get('type') in ['submit', 'reset']:
282282
continue
283-
# check boxes: enabled boxes have the value "on" if not specificed
283+
# check boxes: enabled boxes have the value "on" if not specified
284284
# otherwise. Found out by debugging, perhaps not documented.
285285
if elem.get('type') == 'checkbox' and elem.get('checked') in ["", "checked"]:
286286
value = elem.get('value', 'on')

astroquery/besancon/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def _parse_result(self, response, verbose=False, retrieve_file=True):
166166
raise ValueError("Errors: " + "\n".join(errors))
167167

168168
if verbose:
169-
print("File is %s and can be aquired from %s" % (filename,
169+
print("File is %s and can be acquired from %s" % (filename,
170170
self.url_download
171171
+ '/' + filename))
172172

astroquery/cosmosim/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ def _generate_response_dict(self,response):
561561
Returns
562562
-------
563563
response_dict : dict
564-
A dictionary of some of the repspnse object's methods
564+
A dictionary of some of the response object's methods
565565
"""
566566

567567
R = response
@@ -644,14 +644,14 @@ def general_job_info(self,jobid=None,output=False):
644644
def delete_job(self,jobid=None,squash=None):
645645
"""
646646
A public function which deletes a stored job from the server in any phase.
647-
If no jobid is given, it attemps to use the most recent job (if it exists
647+
If no jobid is given, it attempts to use the most recent job (if it exists
648648
in this session). If jobid is specified, then it deletes the corresponding job,
649649
and if it happens to match the existing current job, that variable gets deleted.
650650
651651
Parameters
652652
----------
653653
jobid : string
654-
The jobid of the sql query. If no jobid is given, it attemps to use the most recent job (if it exists in this session).
654+
The jobid of the sql query. If no jobid is given, it attempts to use the most recent job (if it exists in this session).
655655
output : bool
656656
Print output of response(s) to the terminal
657657

astroquery/eso/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
__doctest_skip__ = ['EsoClass.*']
2424

25+
2526
def _check_response(content):
2627
"""
2728
Check the response from an ESO service query for various types of error
@@ -551,7 +552,7 @@ def retrieve_data(self, datasets, cache=True):
551552
fileLink = "http://dataportal.eso.org/dataPortal"+fileId.attrs['value'].split()[1]
552553
filename = self._request("GET", fileLink, save=True)
553554
files.append(system_tools.gunzip(filename))
554-
self._session.redirect_cache.clear() # EMpty the redirect cache of this request session
555+
self._session.redirect_cache.clear() # Empty the redirect cache of this request session
555556
log.info("Done!")
556557
if (not return_list) and (len(files)==1):
557558
files = files[0]

astroquery/irsa/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def query_region(self, coordinates=None, catalog=None, spatial='Cone',
146146
may also be used.
147147
polygon : list, [Required for spatial is ``'Polygon'``]
148148
A list of ``(ra, dec)`` pairs (as tuples), in decimal degrees,
149-
outlinining the polygon to search in. It can also be a list of
149+
outlining the polygon to search in. It can also be a list of
150150
`astropy.coordinates` object or strings that can be parsed by
151151
`astropy.coordinates.ICRS`.
152152
get_query_payload : bool, optional
@@ -202,7 +202,7 @@ def query_region_async(self, coordinates=None, catalog=None,
202202
may also be used.
203203
polygon : list, [Required for spatial is ``'Polygon'``]
204204
A list of ``(ra, dec)`` pairs (as tuples), in decimal degrees,
205-
outlinining the polygon to search in. It can also be a list of
205+
outlining the polygon to search in. It can also be a list of
206206
`astropy.coordinates` object or strings that can be parsed by
207207
`astropy.coordinates.ICRS`.
208208
get_query_payload : bool, optional
@@ -257,7 +257,7 @@ def _parse_spatial(self, spatial, coordinates, radius=None, width=None,
257257
may also be used.
258258
polygon : list, [Required for spatial is ``'Polygon'``]
259259
A list of ``(ra, dec)`` pairs as tuples of
260-
`astropy.coordinates.Angle`s outlinining the polygon to search in.
260+
`astropy.coordinates.Angle`s outlining the polygon to search in.
261261
It can also be a list of `astropy.coordinates` object or strings
262262
that can be parsed by `astropy.coordinates.ICRS`.
263263

astroquery/irsa_dust/core.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def get_images(self, coordinate, radius=None,
5656
----------
5757
coordinate : str
5858
Can be either the name of an object or a coordinate string
59-
If a name, must be resolveable by NED, SIMBAD, 2MASS, or SWAS.
59+
If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS.
6060
Examples of acceptable coordinate strings, can be found `here.
6161
<http://irsa.ipac.caltech.edu/applications/DUST/docs/coordinate.html>`_
6262
radius : str / `~astropy.units.Quantity`, optional
@@ -102,7 +102,7 @@ def get_images_async(self, coordinate, radius=None,
102102
----------
103103
coordinate : str
104104
Can be either the name of an object or a coordinate string
105-
If a name, must be resolveable by NED, SIMBAD, 2MASS, or SWAS.
105+
If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS.
106106
Examples of acceptable coordinate strings, can be found `here.
107107
<http://irsa.ipac.caltech.edu/applications/DUST/docs/coordinate.html>`_
108108
radius : str / `~astropy.units.Quantity`, optional
@@ -137,14 +137,14 @@ def get_images_async(self, coordinate, radius=None,
137137
def get_image_list(self, coordinate, radius=None, image_type=None,
138138
timeout=TIMEOUT):
139139
"""
140-
Query function that performes coordinate-based query and returns a list
140+
Query function that performs coordinate-based query and returns a list
141141
of URLs to the Irsa-Dust images.
142142
143143
Parameters
144144
-----------
145145
coordinate : str
146146
Can be either the name of an object or a coordinate string
147-
If a name, must be resolveable by NED, SIMBAD, 2MASS, or SWAS.
147+
If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS.
148148
Examples of acceptable coordinate strings, can be found `here.
149149
<http://irsa.ipac.caltech.edu/applications/DUST/docs/coordinate.html>`_
150150
radius : str / `~astropy.units.Quantity`, optional
@@ -181,7 +181,7 @@ def get_extinction_table(self, coordinate, radius=None, timeout=TIMEOUT):
181181
----------
182182
coordinate : str
183183
Can be either the name of an object or a coordinate string
184-
If a name, must be resolveable by NED, SIMBAD, 2MASS, or SWAS.
184+
If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS.
185185
Examples of acceptable coordinate strings, can be found `here.
186186
<http://irsa.ipac.caltech.edu/applications/DUST/docs/coordinate.html>`_
187187
radius : str / `~astropy.units.Quantity`, optional
@@ -217,7 +217,7 @@ def get_extinction_table_async(self, coordinate, radius=None,
217217
----------
218218
coordinate : str
219219
Can be either the name of an object or a coordinate string
220-
If a name, must be resolveable by NED, SIMBAD, 2MASS, or SWAS.
220+
If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS.
221221
Examples of acceptable coordinate strings, can be found `here.
222222
<http://irsa.ipac.caltech.edu/applications/DUST/docs/coordinate.html>`_
223223
radius : str, optional
@@ -253,7 +253,7 @@ def get_query_table(self, coordinate, radius=None,
253253
----------
254254
coordinate : str
255255
Can be either the name of an object or a coordinate string
256-
If a name, must be resolveable by NED, SIMBAD, 2MASS, or SWAS.
256+
If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS.
257257
Examples of acceptable coordinate strings, can be found `here.
258258
<http://irsa.ipac.caltech.edu/applications/DUST/docs/coordinate.html>`_
259259
radius : str / `~astropy.units.Quantity`, optional
@@ -300,7 +300,7 @@ def _args_to_payload(self, coordinate, radius=None):
300300
----------
301301
coordinate : str
302302
Can be either the name of an object or a coordinate string
303-
If a name, must be resolveable by NED, SIMBAD, 2MASS, or SWAS.
303+
If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS.
304304
Examples of acceptable coordinate strings, can be found `here
305305
<http://irsa.ipac.caltech.edu/applications/DUST/docs/coordinate.html>`_
306306
radius : str / `~astropy.units.Quantity`, optional

astroquery/lamda/core.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22
import os
33
import json
4-
import numpy as np
5-
from astropy.table import Table
64
from astropy import table
75
from astropy import log
86
from astropy.utils.console import ProgressBar
@@ -138,7 +136,7 @@ def get_molecules(self, cache=True):
138136
f.write(s)
139137

140138
return molecule_dict
141-
139+
142140
@property
143141
def molecule_dict(self):
144142
if not hasattr(self, '_molecule_dict'):

astroquery/lcogt/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def query_object_async(self, objstr, catalog=None, cache=True,
101101
get_query_payload=False):
102102
"""
103103
Serves the same function as `query_object`, but
104-
only collects the reponse from the LCOGT IPAC archive and returns.
104+
only collects the response from the LCOGT IPAC archive and returns.
105105
106106
Parameters
107107
----------
@@ -170,7 +170,7 @@ def query_region_async(self, coordinates=None, catalog=None,
170170
may also be used.
171171
polygon : list, [Required for spatial is ``'Polygon'``]
172172
A list of ``(ra, dec)`` pairs (as tuples), in decimal degrees,
173-
outlinining the polygon to search in. It can also be a list of
173+
outlining the polygon to search in. It can also be a list of
174174
`astropy.coordinates` object or strings that can be parsed by
175175
`astropy.coordinates.ICRS`.
176176
get_query_payload : bool, optional
@@ -230,7 +230,7 @@ def _parse_spatial(self, spatial, coordinates, radius=None, width=None,
230230
may also be used.
231231
polygon : list, [Required for spatial is ``'Polygon'``]
232232
A list of ``(ra, dec)`` pairs as tuples of
233-
`astropy.coordinates.Angle`s outlinining the polygon to search in.
233+
`astropy.coordinates.Angle`s outlining the polygon to search in.
234234
It can also be a list of `astropy.coordinates` object or strings
235235
that can be parsed by `astropy.coordinates.ICRS`.
236236

astroquery/lcogt/tests/test_lcogt.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from __future__ import print_function
33
import os
44
import re
5-
import requests
65
import numpy as np
76

87
from astropy.tests.helper import pytest

0 commit comments

Comments
 (0)