aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/routes.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-11-02 17:55:15 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-11-02 17:55:22 -0700
commit6fa2d38be243531747241a3ae602069d507368d9 (patch)
tree7cc81446a97a372640f6a189f09b88fa466e77ce /python/fatcat_web/routes.py
parent367b06f64546e4533662017c9dbe72aca175a294 (diff)
downloadfatcat-6fa2d38be243531747241a3ae602069d507368d9.tar.gz
fatcat-6fa2d38be243531747241a3ae602069d507368d9.zip
lint: simple, safe inline lint fixes
'==' vs 'is'; 'not a in b' vs 'a not in b'; etc
Diffstat (limited to 'python/fatcat_web/routes.py')
-rw-r--r--python/fatcat_web/routes.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index 9795adf7..fc94da66 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -738,7 +738,7 @@ def release_save(ident):
@app.route('/search', methods=['GET', 'POST'])
def generic_search():
- if not 'q' in request.args.keys():
+ if 'q' not in request.args.keys():
return redirect('/release/search')
query = request.args.get('q').strip()
@@ -1080,7 +1080,7 @@ def change_username():
if not app.testing:
app.csrf.protect()
# show the user a list of login options
- if not 'username' in request.form:
+ if 'username' not in request.form:
abort(400)
# on behalf of user...
user_api = auth_api(session['api_token'])