Fixed PEP8 errors, PR comments
@@ -128,13 +128,15 @@ class ADSClass(BaseQuery):
if self.TOKEN is not None:
return self.TOKEN
- token_file = '~/.ads/dev_key'
+ token_file = os.path.expanduser('~/.ads/dev_key')
try:
with open(token_file) as f:
self.TOKEN = f.read().strip()
return self.TOKEN
except IOError:
- raise RuntimeError('No API token found! Get yours from: https://ui.adsabs.harvard.edu/#user/settings/token ' +
+ raise RuntimeError('No API token found! Get yours from: ' +
+ 'https://ui.adsabs.harvard.edu/#user/settings/token ' +
'and store it in the API_DEV_KEY environment variable.')
ADS = ADSClass()
+
