From 2bcf59109e5769645648202afefd80ad5ccc5cac Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 24 Oct 2026 22:31:20 +0200 Subject: [PATCH] style(web-app-keycloak): apply autoformat to the merged keycloak files ruff drops three noqa: E402 markers as unused (RUF100): E402 does not fire on an import that follows sys.path.insert. The formatter also wraps the long KEYCLOAK_RBAC_GROUP_LOGIC_DIGEST line; the double-quoted scalar folds the break back into a space. Co-Authored-By: Claude Opus 5.5 --- roles/web-app-keycloak/vars/main.yml | 3 ++- .../python/roles/web-app-keycloak/files/test_email_verified.py | 2 +- .../python/roles/web-app-keycloak/files/test_keycloak_admin.py | 2 +- .../python/roles/web-app-keycloak/files/test_rbac_reconcile.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/roles/web-app-keycloak/vars/main.yml b/roles/web-app-keycloak/vars/main.yml index a64f7e23aa..c5948f79dc 100644 --- a/roles/web-app-keycloak/vars/main.yml +++ b/roles/web-app-keycloak/vars/main.yml @@ -17,7 +17,8 @@ KEYCLOAK_RBAC_ALL_APP_IDS: "{{ lookup('deployment').groups | rbac_app_ids }}" KEYCLOAK_RBAC_RUN_APP_IDS: "{{ lookup('deployment').running | rbac_app_ids }}" KEYCLOAK_RBAC_WORKERS: "{{ [RESOURCE_HOST_CPUS | int // 2, 1] | max }}" -KEYCLOAK_RBAC_GROUP_LOGIC_DIGEST: "{{ lookup('file', lookup('path_absolute', 'roles/svc-db-openldap/filter_plugins/build_ldap_role_entries.py')) | hash('sha256') }}" +KEYCLOAK_RBAC_GROUP_LOGIC_DIGEST: "{{ lookup('file', lookup('path_absolute', 'roles/svc-db-openldap/filter_plugins/build_ldap_role_entries.py')) | hash('sha256') + }}" KEYCLOAK_PER_APP_LDAP_ROLES_MAPPER_PAYLOADS_FILE: "/tmp/kc_per_app_mapper_payloads.txt" KEYCLOAK_PER_APP_LDAP_ROLES_MAPPER_TEMPLATE: >- {{ diff --git a/tests/unit/python/roles/web-app-keycloak/files/test_email_verified.py b/tests/unit/python/roles/web-app-keycloak/files/test_email_verified.py index 0cd86d74dc..f65275f163 100644 --- a/tests/unit/python/roles/web-app-keycloak/files/test_email_verified.py +++ b/tests/unit/python/roles/web-app-keycloak/files/test_email_verified.py @@ -10,7 +10,7 @@ from . import PROJECT_ROOT sys.path.insert(0, str(PROJECT_ROOT / "roles/web-app-keycloak/files/python")) -import email_verified as m # noqa: E402 +import email_verified as m class FakeKeycloak: diff --git a/tests/unit/python/roles/web-app-keycloak/files/test_keycloak_admin.py b/tests/unit/python/roles/web-app-keycloak/files/test_keycloak_admin.py index bfe6aeed0e..0ddc3bb301 100644 --- a/tests/unit/python/roles/web-app-keycloak/files/test_keycloak_admin.py +++ b/tests/unit/python/roles/web-app-keycloak/files/test_keycloak_admin.py @@ -11,7 +11,7 @@ from . import PROJECT_ROOT sys.path.insert(0, str(PROJECT_ROOT / "roles/web-app-keycloak/files/python")) -import keycloak_admin as m # noqa: E402 +import keycloak_admin as m class TestContainerCredentials(unittest.TestCase): diff --git a/tests/unit/python/roles/web-app-keycloak/files/test_rbac_reconcile.py b/tests/unit/python/roles/web-app-keycloak/files/test_rbac_reconcile.py index 90bd28bba5..d6b4545fbe 100644 --- a/tests/unit/python/roles/web-app-keycloak/files/test_rbac_reconcile.py +++ b/tests/unit/python/roles/web-app-keycloak/files/test_rbac_reconcile.py @@ -9,7 +9,7 @@ from . import PROJECT_ROOT sys.path.insert(0, str(PROJECT_ROOT / "roles/web-app-keycloak/files/python")) -import rbac_reconcile as m # noqa: E402 +import rbac_reconcile as m LDAP = "ldap-1"