PEP8 changes
This commit is contained in:
parent
3a2b279e33
commit
86403fe07a
|
@ -59,7 +59,8 @@ app.config['BANG_PATH'] = os.getenv(
|
|||
app.config['BANG_FILE'] = os.path.join(
|
||||
app.config['BANG_PATH'],
|
||||
'bangs.json')
|
||||
app.config['RELEASES_URL'] = 'https://github.com/benbusby/whoogle-search/releases'
|
||||
app.config['RELEASES_URL'] = 'https://github.com/' \
|
||||
'benbusby/whoogle-search/releases'
|
||||
|
||||
# The alternative to Google Translate is treated a bit differently than other
|
||||
# social media site alternatives, in that it is used for any translation
|
||||
|
|
|
@ -30,10 +30,11 @@ bang_json = json.load(open(app.config['BANG_FILE']))
|
|||
# Check the newest version of WHOOGLE
|
||||
update = bsoup(get(app.config['RELEASES_URL']).text, 'html.parser')
|
||||
newest_version = update.select_one('[class="Link--primary"]').string[1:]
|
||||
current_version = int(''.join(filter(str.isdigit, app.config['VERSION_NUMBER'])))
|
||||
current_version = int(''.join(filter(str.isdigit,
|
||||
app.config['VERSION_NUMBER'])))
|
||||
newest_version = int(''.join(filter(str.isdigit, newest_version)))
|
||||
newest_version = newest_version if (current_version
|
||||
< newest_version) else ''
|
||||
newest_version = '' if current_version >= newest_version \
|
||||
else newest_version
|
||||
|
||||
|
||||
def auth_required(f):
|
||||
|
|
Loading…
Reference in New Issue
Block a user