Skip to content

Commit 8540277

Browse files
committed
whitespace
1 parent 232c133 commit 8540277

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

astroquery/template_module/core.py

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@
1313

1414
# 3. local imports - use relative imports
1515
# commonly required local imports shown below as example
16-
from ..query import BaseQuery # all Query classes should inherit from this.
17-
from ..utils import commons # has common functions required by most modules
18-
from ..utils import prepend_docstr_noreturns # automatically generate docs for similar functions
19-
from ..utils import async_to_sync # all class methods must be callable as static as well as instance methods.
20-
from . import conf # import configurable items declared in __init__.py
16+
# all Query classes should inherit from BaseQuery.
17+
from ..query import BaseQuery
18+
# has common functions required by most modules
19+
from ..utils import commons
20+
# prepend_docstr is a way to copy docstrings between methods
21+
from ..utils import prepend_docstr_noreturns
22+
# async_to_sync generates the relevant query tools from _async methods
23+
from ..utils import async_to_sync
24+
# import configurable items declared in __init__.py
25+
from . import conf
2126

2227

2328
# export all the public classes and methods
@@ -36,7 +41,8 @@ class TemplateClass(BaseQuery):
3641
cases, new methods may be added if necessary, follow the guidelines at
3742
<http://astroquery.readthedocs.org/en/latest/api.html>
3843
"""
39-
# use the Configuration Items imported from __init__.py to set the URL, TIMEOUT, etc.
44+
# use the Configuration Items imported from __init__.py to set the URL,
45+
# TIMEOUT, etc.
4046
URL = conf.server
4147
TIMEOUT = conf.timeout
4248

@@ -47,7 +53,8 @@ class TemplateClass(BaseQuery):
4753
# this:
4854
"""
4955
def query_object(object_name, get_query_payload=False)
50-
response = self.query_object_async(object_name, get_query_payload=get_query_payload)
56+
response = self.query_object_async(object_name,
57+
get_query_payload=get_query_payload)
5158
if get_query_payload:
5259
return response
5360
result = self._parse_result(response, verbose=verbose)
@@ -123,8 +130,8 @@ def query_object_async(self, object_name, get_query_payload=False):
123130
# method also has a 'radius' keyword for specifying the radius around
124131
# the coordinates in which to search. If the region is a box, then
125132
# the keywords 'width' and 'height' should be used instead. The coordinates
126-
# may be accepted as an `astropy.coordinates` object or as a
127-
# string, which may be further parsed.
133+
# may be accepted as an `astropy.coordinates` object or as a string, which
134+
# may be further parsed.
128135

129136
# similarly we write a query_region_async method that makes the
130137
# actual HTTP request and returns the HTTP response
@@ -155,7 +162,8 @@ def query_region_async(self, coordinates, radius, height, width,
155162
The HTTP response returned from the service.
156163
All async methods should return the raw HTTP response.
157164
"""
158-
request_payload = self._args_to_payload(coordinates, radius, height, width)
165+
request_payload = self._args_to_payload(coordinates, radius, height,
166+
width)
159167
if get_query_payload:
160168
return request_payload
161169
response = self._request('GET', self.URL, params=request_payload,
@@ -291,7 +299,9 @@ def get_image_list(self, coordinates, radius, get_query_payload=False):
291299

292300
def extract_image_urls(self, html_str):
293301
"""
294-
Helper function that uses regex to extract the image urls from the given HTML.
302+
Helper function that uses regex to extract the image urls from the
303+
given HTML.
304+
295305
Parameters
296306
----------
297307
html_str : str

0 commit comments

Comments
 (0)