Skip to content

Commit 68fb4aa

Browse files
committed
test removing Raises sections
1 parent 62fc86e commit 68fb4aa

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

astroquery/sdss/core.py

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -126,20 +126,22 @@ def query_crossid_async(self, coordinates, *, radius=5. * u.arcsec, timeout=TIME
126126
cache : bool, optional
127127
If ``True`` use the request caching mechanism.
128128
129-
Raises
130-
------
131-
TypeError
132-
If the `radius` keyword could not be parsed as an angle.
133-
ValueError
134-
If the `radius` exceeds 3 arcmin, or if the sizes of
135-
`coordinates` and `obj_names` do not match.
136-
137129
Returns
138130
-------
139131
result : `~astropy.table.Table`
140132
The result of the query as a `~astropy.table.Table` object.
141133
142134
"""
135+
# Move Raises section here, since async_to_sync does not appear to like it.
136+
#
137+
# Raises
138+
# ------
139+
# TypeError
140+
# If the `radius` keyword could not be parsed as an angle.
141+
# ValueError
142+
# If the `radius` exceeds 3 arcmin, or if the sizes of
143+
# `coordinates` and `obj_names` do not match.
144+
143145

144146
if isinstance(radius, Angle):
145147
radius = radius.to_value(u.arcmin)
@@ -286,15 +288,6 @@ def query_region_async(self, coordinates, *, radius=None,
286288
cache : bool, optional
287289
If ``True`` use the request caching mechanism.
288290
289-
Raises
290-
------
291-
TypeError
292-
If the `radius`, `width` or `height` keywords could not be parsed as an angle.
293-
ValueError
294-
If both `radius` and `width are set (or neither),
295-
or if the `radius` exceeds 3 arcmin,
296-
or if the sizes of `coordinates` and `obj_names` do not match.
297-
298291
Examples
299292
--------
300293
>>> from astroquery.sdss import SDSS
@@ -316,6 +309,17 @@ def query_region_async(self, coordinates, *, radius=None,
316309
The result of the query as a `~astropy.table.Table` object.
317310
318311
"""
312+
# Move Raises section here, since async_to_sync does not appear to like it.
313+
#
314+
# Raises
315+
# ------
316+
# TypeError
317+
# If the `radius`, `width` or `height` keywords could not be parsed as an angle.
318+
# ValueError
319+
# If both `radius` and `width are set (or neither),
320+
# or if the `radius` exceeds 3 arcmin,
321+
# or if the sizes of `coordinates` and `obj_names` do not match.
322+
319323
# Allow field_help requests to pass without requiring a radius or width.
320324
if field_help and radius is None and width is None:
321325
radius = 2.0 * u.arcsec

astroquery/sdss/tests/test_sdss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,5 +597,5 @@ def test_field_help_region(patch_request):
597597

598598
def test_rectangle_sql():
599599
sql = sdss.SDSS._rectangle_sql(0, 0, 1)
600-
assert sql == '(((p.ra >= 359.5) OR (p.ra <= 0.5)) AND (p.dec BETWEEN -0.5 AND 0.5))
600+
assert sql == '(((p.ra >= 359.5) OR (p.ra <= 0.5)) AND (p.dec BETWEEN -0.5 AND 0.5))'
601601
# assert sql == '((p.ra BETWEEN -0.5 AND 0.5) AND (p.dec BETWEEN -0.5 AND 0.5))

0 commit comments

Comments
 (0)