Skip to content

Commit aa4078c

Browse files
committed
review comments
1 parent b4daf03 commit aa4078c

File tree

3 files changed

+13
-27
lines changed

3 files changed

+13
-27
lines changed

astroquery/esa/hsa/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from pathlib import Path
88

99
from astropy import units as u
10-
from ...utils import commons
10+
from astroquery.utils import commons
1111
from astroquery import log
1212
from astroquery.exceptions import LoginError
1313
from astroquery.query import BaseQuery
@@ -25,7 +25,7 @@ class HSAClass(BaseQuery):
2525
timeout = conf.TIMEOUT
2626

2727
def __init__(self, tap_handler=None):
28-
super(HSAClass, self).__init__()
28+
super().__init__()
2929
if tap_handler is None:
3030
self._tap = Tap(url=self.metadata_url)
3131
else:

astroquery/esa/hsa/tests/dummy_handler.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,30 @@ def check_method(self, method):
2121
if method == self._invokedMethod:
2222
return
2323
else:
24-
raise ValueError("Method '{}' is not invoked. (Invoked method \
25-
is '{}'.)").format(method, self_invokedMethod)
24+
raise ValueError("Method '{}' is not invoked. (Invoked method "
25+
"is '{}'.)".format(method, self._invokedMethod))
2626

2727
def check_parameters(self, parameters, method_name):
2828
if parameters is None:
2929
return len(self._parameters) == 0
3030
if len(parameters) != len(self._parameters):
31-
raise ValueError("Wrong number of parameters for method '{}'. \
32-
Found: {}. Expected {}").format(
31+
raise ValueError("Wrong number of parameters for method '{}'. "
32+
"Found: {}. Expected {}".format(
3333
method_name,
3434
len(self._parameters),
35-
len(parameters))
35+
len(parameters)))
3636
for key in parameters:
3737
if key in self._parameters:
3838
# check value
3939
if self._parameters[key] != parameters[key]:
40-
raise ValueError("Wrong '{}' parameter \
41-
value for method '{}'. \
42-
Found:'{}'. Expected:'{}'").format(
40+
raise ValueError("Wrong '{}' parameter "
41+
"value for method '{}'. "
42+
"Found:'{}'. Expected:'{}'".format(
4343
method_name,
4444
key,
4545
self._parameters[key],
46-
parameters[key])
46+
parameters[key]))
4747
else:
48-
raise ValueError("Parameter '%s' not found in method '%s'",
49-
(str(key), method_name))
48+
raise ValueError("Parameter '{}' not found in method '{}'"
49+
.format(str(key), method_name))
5050
return True

astroquery/esa/hsa/tests/setup_package.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)