diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1a6b0e5a5..08cb9ab7e 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -24,7 +24,7 @@ repos:
# - '@trivago/prettier-plugin-sort-imports@3.2.0' # removing it since pre-commit install fails
- repo: https://github.com/PyCQA/flake8
- rev: 3.9.2
+ rev: 7.1.1
hooks:
- id: flake8
files: "^querybook/(server|tests)/.*\\.py$"
diff --git a/querybook/server/app/auth/oauth_auth.py b/querybook/server/app/auth/oauth_auth.py
index a9bc68aa7..e545574b1 100644
--- a/querybook/server/app/auth/oauth_auth.py
+++ b/querybook/server/app/auth/oauth_auth.py
@@ -75,7 +75,7 @@ def oauth_callback(self):
LOG.debug("Handling Oauth callback...")
if request.args.get("error"):
- return f"
Error: { Markup.escape(request.args.get('error')) }
"
+ return f"Error: {Markup.escape(request.args.get('error'))}
"
code = request.args.get("code")
try:
diff --git a/querybook/server/app/auth/okta_auth.py b/querybook/server/app/auth/okta_auth.py
index 221df42dc..f5dab4328 100644
--- a/querybook/server/app/auth/okta_auth.py
+++ b/querybook/server/app/auth/okta_auth.py
@@ -85,7 +85,7 @@ def oauth_callback(self):
LOG.debug("Handling Oauth callback...")
if request.args.get("error"):
- return f"Error: { Markup.escape(request.args.get('error')) }
"
+ return f"Error: {Markup.escape(request.args.get('error'))}
"
code = request.args.get("code")
try:
diff --git a/querybook/server/logic/environment.py b/querybook/server/logic/environment.py
index 4ef978ab0..6ad2112a8 100644
--- a/querybook/server/logic/environment.py
+++ b/querybook/server/logic/environment.py
@@ -55,7 +55,7 @@ def get_all_visible_environments_by_uid(uid, session=None):
or_(
Environment.hidden != True, # noqa: E712
UserEnvironment.user_id == uid,
- Environment.public == True,
+ Environment.public == True, # noqa: E712
)
)
.all()
diff --git a/setup.cfg b/setup.cfg
index ae08d6521..45d0ebf41 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -14,6 +14,7 @@ ignore=
E241,
E305,
E402,
+ E721,
E722,
E741,
N801,