Skip to content

Commit 41efcba

Browse files
at88mphbsipocz
authored andcommitted
Hush the linter.
1 parent 8bfce9a commit 41efcba

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

astroquery/alma/core.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -229,37 +229,36 @@ def __init__(self):
229229
self._auth_hosts = auth_urls
230230
self._auth_host = None
231231

232-
233232
def set_auth_hosts(self, auth_hosts):
234233
"""
235234
Set the available hosts to check for login endpoints.
236235
237236
Parameters
238237
----------
239238
auth_hosts : array
240-
Available hosts name. Checking each one until one returns a 200 for
239+
Available hosts name. Checking each one until one returns a 200 for
241240
the well-known endpoint.
242241
"""
243242
self._auth_hosts = auth_hosts
244-
243+
245244
@property
246245
def host(self):
247246
if self._auth_host is None:
248247
for auth_url in self._auth_hosts:
249248
# set session cookies (they do not get set otherwise)
250249
url_to_check = f'https://{auth_url}{self._VERIFY_WELL_KNOWN_ENDPOINT}'
251250
response = self._request("HEAD", url_to_check, cache=False)
252-
251+
253252
if response.status_code == 200:
254253
self._auth_host = auth_url
255254
log.debug(f'Set auth host to {self._auth_host}')
256255
break
257-
256+
258257
if self._auth_host is None:
259258
raise LoginError(f'No useable hosts to login to: {self._auth_hosts}')
260259
else:
261260
return self._auth_host
262-
261+
263262
def login(self, username, password):
264263
"""
265264
Authenticate to one of the configured hosts.
@@ -288,7 +287,7 @@ def login(self, username, password):
288287
error_message = json_auth['error_description']
289288
if self._INVALID_PASSWORD_MESSAGE not in error_message:
290289
raise LoginError("Could not log in to ALMA authorization portal: "
291-
f"{self.host} Message from server: {error_message}")
290+
f"{self.host} Message from server: {error_message}")
292291
else:
293292
log.error(error_message)
294293
elif 'access_token' not in json_auth:
@@ -997,11 +996,11 @@ def _login(self, username=None, store_password=False,
997996
"""
998997

999998
self.auth.set_auth_hosts(auth_urls)
1000-
999+
10011000
username, password = self._get_auth_info(username=username,
10021001
store_password=store_password,
10031002
reenter_password=reenter_password)
1004-
1003+
10051004
self.auth.login(username, password)
10061005
self.USERNAME = username
10071006

0 commit comments

Comments
 (0)