From d2d31b0f46857b417fe9e342b4f2c47e47b43b37 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 20:57:01 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - https://github.com/ambv/black → https://github.com/psf/black - [github.com/psf/black: 22.3.0 → 24.10.0](https://github.com/psf/black/compare/22.3.0...24.10.0) - [github.com/PyCQA/flake8: 7.0.0 → 7.1.1](https://github.com/PyCQA/flake8/compare/7.0.0...7.1.1) - [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.3.0...v5.0.0) - https://github.com/asottile/reorder_python_imports → https://github.com/asottile/reorder-python-imports - [github.com/asottile/reorder-python-imports: v3.1.0 → v3.14.0](https://github.com/asottile/reorder-python-imports/compare/v3.1.0...v3.14.0) - [github.com/Riverside-Healthcare/djLint: v1.24.0 → v1.35.2](https://github.com/Riverside-Healthcare/djLint/compare/v1.24.0...v1.35.2) - [github.com/Yelp/detect-secrets: v1.4.0 → v1.5.0](https://github.com/Yelp/detect-secrets/compare/v1.4.0...v1.5.0) --- .pre-commit-config.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7e8811ed..1b6b32b2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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', From 6fa3763afd878aeda5da76e80e2ec0219420fd93 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 20:57:20 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- app/create_app.py | 6 +++--- app/default/application_routes.py | 5 ++++- tests/test_dashboard.py | 4 ++-- tests/test_tasks.py | 3 +-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/create_app.py b/app/create_app.py index c109cbb3..536598b6 100644 --- a/app/create_app.py +++ b/app/create_app.py @@ -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 diff --git a/app/default/application_routes.py b/app/default/application_routes.py index 14d0f844..79e45df3 100644 --- a/app/default/application_routes.py +++ b/app/default/application_routes.py @@ -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, ) diff --git a/tests/test_dashboard.py b/tests/test_dashboard.py index a3c33ef4..f929c24c 100644 --- a/tests/test_dashboard.py +++ b/tests/test_dashboard.py @@ -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", diff --git a/tests/test_tasks.py b/tests/test_tasks.py index 6770b5d6..fb710b38 100644 --- a/tests/test_tasks.py +++ b/tests/test_tasks.py @@ -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"