Skip to content

Commit 28b2340

Browse files
author
Alexis
committed
Prospector compliance #2
1 parent 3544bf7 commit 28b2340

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

oxe-api/resource/form/extract_form.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def get(self, **kwargs):
6666
.filter(self.db.tables["FormAnswer"].form_question_id.in_([q.id for q in questions])) \
6767
.all()
6868

69-
user_ids = list(set([a.user_id for a in answers]))
69+
user_ids = list({a.user_id for a in answers})
7070

7171
users = self.db.session \
7272
.query(self.db.tables["User"]) \
@@ -116,7 +116,7 @@ def prepare_xlsx(self, df, questions, users):
116116
# Clean cells
117117

118118
for c in df.columns:
119-
df[c] = df[c].apply(lambda x: clean_html(x))
119+
df[c] = df[c].apply(clean_html)
120120

121121
# Build the XLS file
122122

oxe-api/utils/speadsheet.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
def clean_html(raw_html):
5-
if type(raw_html) is not str:
5+
if not isinstance(raw_html, str):
66
return None
77

88
raw_html = raw_html.replace("</p>", "\n").replace("&nbsp;", "")

oxe-api/wsgi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
# pylint: disable=wrong-import-position
88
from app import app as application
9-
assert app # nosec
9+
assert application # nosec

0 commit comments

Comments
 (0)