Skip to content

Commit 496ad85

Browse files
author
Clara Brasseur
committed
pep8
1 parent fc8c0df commit 496ad85

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

astroquery/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ def _get_bibtex():
3131

3232

3333
class Conf(_config.ConfigNamespace):
34-
34+
3535
default_cache_timeout = _config.ConfigItem(
36-
86400, # 24 hours
36+
86400, # 24 hours
3737
'Astroquery-wide default cache timeout (seconds).'
3838
)
3939
cache_location = _config.ConfigItem(
@@ -45,4 +45,5 @@ class Conf(_config.ConfigNamespace):
4545
"Astroquery global cache usage, False turns off all caching."
4646
)
4747

48+
4849
conf = Conf()

astroquery/query.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def __init__(self):
172172
self.cache_location = os.path.join(
173173
conf.cache_location,
174174
self.__class__.__name__.split("Class")[0])
175-
175+
176176
self.use_cache = conf.use_cache
177177
self.cache_timeout = conf.default_cache_timeout
178178

@@ -185,18 +185,18 @@ def clear_cache(self):
185185

186186
cache_files = [x for x in os.listdir(self.cache_location) if x.endswith("pickle")]
187187
for fle in cache_files:
188-
os.remove(os.path.join(self.cache_location,fle))
188+
os.remove(os.path.join(self.cache_location, fle))
189189

190190
def reset_cache_preferences(self):
191191
"""Resets cache preferences to default values"""
192192

193193
self.cache_location = os.path.join(
194194
conf.cache_location,
195195
self.__class__.__name__.split("Class")[0])
196-
196+
197197
self.use_cache = conf.use_cache
198198
self.cache_timeout = conf.default_cache_timeout
199-
199+
200200

201201
def _request(self, method, url, params=None, data=None, headers=None,
202202
files=None, save=False, savedir='', timeout=None, cache=None,
@@ -255,19 +255,19 @@ def _request(self, method, url, params=None, data=None, headers=None,
255255
files=files,
256256
timeout=timeout
257257
)
258-
258+
259259
if (cache is not False) and self.use_cache:
260260
cache = True
261261
else:
262262
cache = False
263-
263+
264264
if save:
265265
local_filename = url.split('/')[-1]
266266
if os.name == 'nt':
267267
# Windows doesn't allow special characters in filenames like
268268
# ":" so replace them with an underscore
269269
local_filename = local_filename.replace(':', '_')
270-
local_filepath = os.path.join(savedir or self.cache_location or '.', local_filename)
270+
local_filepath = os.path.join(savedir or self.cache_location or '.', local_filename)
271271
self._download_file(url, local_filepath, cache=cache,
272272
continuation=continuation, method=method,
273273
auth=auth, **req_kwargs)

0 commit comments

Comments
 (0)