Skip to content
Snippets Groups Projects
Commit cdd7aa27 authored by Bjarke Madsen's avatar Bjarke Madsen
Browse files

Fix flake8 errors that only show up in release process..

parent 29cdf74b
No related branches found
No related tags found
No related merge requests found
...@@ -76,7 +76,7 @@ def convert_answers(answers): ...@@ -76,7 +76,7 @@ def convert_answers(answers):
else: else:
subdict = subdict.setdefault(name, {}) subdict = subdict.setdefault(name, {})
if type(subdict) == list: # special case where json list is mapped to a list of dicts (part 2) if isinstance(subdict, list): # special case where json list is mapped to a list of dicts (part 2)
for answer_entry in answer: for answer_entry in answer:
subdict.append({question_names[-1]: answer_entry}) subdict.append({question_names[-1]: answer_entry})
elif question_names[-1] == "available": # special case because we changed the policies questions a bit elif question_names[-1] == "available": # special case because we changed the policies questions a bit
......
...@@ -287,9 +287,9 @@ def inspect_survey(year) -> Any: ...@@ -287,9 +287,9 @@ def inspect_survey(year) -> Any:
def visible_visitor(object, items): def visible_visitor(object, items):
for key, value in items: for key, value in items:
if type(value) == dict: if isinstance(value, dict):
visible_visitor(value, value.items()) visible_visitor(value, value.items())
elif type(value) == list: elif isinstance(value, list):
visible_visitor(value, enumerate(value)) visible_visitor(value, enumerate(value))
elif key == 'visibleIf': elif key == 'visibleIf':
object['title'] = object['title'] + ' (visibleif: [' + value.replace('{', '#').replace('}', '#') + '])' object['title'] = object['title'] + ' (visibleif: [' + value.replace('{', '#').replace('}', '#') + '])'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment