Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #159

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
repos:
- repo: https://github.com/ambv/black
rev: 22.3.0
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
rev: 7.1.1
hooks:
- id: flake8
args:
- --max-line-length=120
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-ast
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.1.0
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.14.0
hooks:
- id: reorder-python-imports
name: Reorder Python imports (src, tests)
args: ["--application-directories", "src"]
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
rev: v1.5.0
hooks:
- id: detect-secrets
args: ['--disable-plugin', 'HexHighEntropyString',
Expand Down
36 changes: 18 additions & 18 deletions fsd_utils/mapping/application/qa_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def extract_questions_and_answers(forms, language=EN) -> dict:
# then we remove the aws
# key attached to the answer
if isinstance(answer, str):
questions_answers[form_name][
field["title"]
] = answer.split("/")[-1]
questions_answers[form_name][field["title"]] = (
answer.split("/")[-1]
)
else:
questions_answers[form_name][field["title"]] = answer

Expand All @@ -48,9 +48,9 @@ def extract_questions_and_answers(forms, language=EN) -> dict:
)

elif isinstance(answer, list) and field["type"] == "multiInput":
questions_answers[form_name][
field["title"]
] = MultiInput.map_multi_input_data(answer, language)
questions_answers[form_name][field["title"]] = (
MultiInput.map_multi_input_data(answer, language)
)

elif field["type"] == "freeText":
clean_html_answer = FreeText.remove_html_tags(answer)
Expand All @@ -60,24 +60,24 @@ def extract_questions_and_answers(forms, language=EN) -> dict:
] = clean_html_answer

elif isinstance(answer, list) and field["type"] == "list":
questions_answers[form_name][
field["title"]
] = format_checkbox(answer)
questions_answers[form_name][field["title"]] = (
format_checkbox(answer)
)

elif isinstance(answer, str) and field["type"] == "list":
questions_answers[form_name][
field["title"]
] = format_radio_field(answer)
questions_answers[form_name][field["title"]] = (
format_radio_field(answer)
)

elif field["type"] == "monthYear":
questions_answers[form_name][
field["title"]
] = format_month_year(answer)
questions_answers[form_name][field["title"]] = (
format_month_year(answer)
)

elif field["type"] == "date":
questions_answers[form_name][
field["title"]
] = format_date_month_year(answer)
questions_answers[form_name][field["title"]] = (
format_date_month_year(answer)
)

else:
# we dont want to display boolean question
Expand Down
Loading