1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 19:19:59 +00:00

8: PEP8 routes.py (E265, E266, E713)

E265	block comment should start with ‘# ‘
E266	too many leading ‘#’ for block comment
E713	test for membership should be ‘not in’
This commit is contained in:
sharkykh 2017-05-14 10:24:34 +03:00 committed by Kfir Hadas
parent 1b99908283
commit beb5be9989

View file

@ -76,7 +76,7 @@ def before_request():
flask.g.user = user flask.g.user = user
if not 'timeout' in flask.session or flask.session['timeout'] < datetime.now(): if not 'timeout' not in flask.session or flask.session['timeout'] < datetime.now():
flask.session['timeout'] = datetime.now() + timedelta(days=7) flask.session['timeout'] = datetime.now() + timedelta(days=7)
flask.session.permanent = True flask.session.permanent = True
flask.session.modified = True flask.session.modified = True
@ -613,7 +613,7 @@ def send_verification_email(to_address, activ_link):
server.quit() server.quit()
#################################### STATIC PAGES #################################### # #################################### STATIC PAGES ####################################
@app.route('/rules', methods=['GET']) @app.route('/rules', methods=['GET'])
def site_rules(): def site_rules():
return flask.render_template('rules.html') return flask.render_template('rules.html')
@ -624,7 +624,7 @@ def site_help():
return flask.render_template('help.html') return flask.render_template('help.html')
#################################### API ROUTES #################################### # #################################### API ROUTES ####################################
# DISABLED FOR NOW # DISABLED FOR NOW
@app.route('/api/upload', methods=['POST']) @app.route('/api/upload', methods=['POST'])
def api_upload(): def api_upload():