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 #537

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
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
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
args:
- --target-version=py310
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies: [Flake8-pyproject]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.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/Riverside-Healthcare/djLint
rev: v1.24.0
rev: v1.35.2
hooks:
- id: djlint-jinja
types_or: ['html', 'jinja']
- 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
6 changes: 3 additions & 3 deletions app/create_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def inject_global_constants():
return dict(
stage="beta",
service_meta_author="Department for Levelling up Housing and Communities",
toggle_dict={feature.name: feature.is_enabled() for feature in toggle_client.list()}
if toggle_client
else {},
toggle_dict=(
{feature.name: feature.is_enabled() for feature in toggle_client.list()} if toggle_client else {}
),
)

@flask_app.context_processor
Expand Down
5 changes: 4 additions & 1 deletion app/default/application_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,10 @@ def tasklist(application_id):
# note that individual section feedback COULD be independent of round feedback survey.
# which is why this is not under a conditional round_data.feedback_survey_config.
if round_data.feedback_survey_config.has_section_feedback:
(current_feedback_list, existing_feedback_map,) = get_section_feedback_data(
(
current_feedback_list,
existing_feedback_map,
) = get_section_feedback_data(
application,
section_display_config,
)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def test_dashboard_route_search_call(
expected_search_params,
):
request_mock = mocker.patch("app.default.account_routes.request")
request_mock.args.get = (
lambda key, default: fund_short_name if key == "fund" else (round_short_name if key == "round" else default)
request_mock.args.get = lambda key, default: (
fund_short_name if key == "fund" else (round_short_name if key == "round" else default)
)
get_apps_mock = mocker.patch(
"app.default.account_routes.search_applications",
Expand Down
3 changes: 1 addition & 2 deletions tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ def test_find_missing_trans(tmpdir, capsys):

stdoutput = capsys.readouterr().out
assert (
stdoutput
== f"Missing translations in {f.strpath}:\n A missing translation\n "
stdoutput == f"Missing translations in {f.strpath}:\n A missing translation\n "
" Another missing translation\n A third missing translation, that"
" spans multiple lines. We want to capture all of its content.\n "
" A fourth missing translation, that spans multiple lines. We"
Expand Down