aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-05-25 16:31:22 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-05-25 16:31:24 -0700
commit4e89e677f03fbedb48f3f0dc6b23e159b5e33e27 (patch)
treef3020f8e78dd176f476273d83c581923fdd0a029
parentdb8798699bc6d06dbcab59c4617e0c5d4f94a724 (diff)
downloadfatcat-4e89e677f03fbedb48f3f0dc6b23e159b5e33e27.tar.gz
fatcat-4e89e677f03fbedb48f3f0dc6b23e159b5e33e27.zip
skip pylint on 'assigning-non-slot' warnings in Flask 2.0
The 'permanent' field is still valid to set to a boolean in Flask 2.0; not sure why pylint is unhappy in CI (causing test failures). Don't see any problem running test suite locally. Flask API docs: https://flask.palletsprojects.com/en/2.0.x/api/?highlight=permanent#flask.session.permanent And code (recent master branch): https://github.com/pallets/flask/blob/4240ace59710d86c478111affd4ad6fb4c8cad9e/src/flask/sessions.py#L20
-rw-r--r--python/fatcat_web/auth.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/fatcat_web/auth.py b/python/fatcat_web/auth.py
index a1ba1929..73869544 100644
--- a/python/fatcat_web/auth.py
+++ b/python/fatcat_web/auth.py
@@ -36,7 +36,7 @@ def handle_token_login(token):
abort(400)
# fetch editor info
editor = api.get_editor(editor_id)
- session.permanent = True
+ session.permanent = True # pylint: disable=assigning-non-slot
session['api_token'] = token
session['editor'] = editor.to_dict()
login_user(load_user(editor.editor_id))
@@ -76,7 +76,7 @@ def handle_oauth(remote, token, user_info):
api_token = resp.token
# write token and username to session
- session.permanent = True
+ session.permanent = True # pylint: disable=assigning-non-slot
session['api_token'] = api_token
session['editor'] = editor.to_dict()