From bd57d69765f5a28fc1346e0398de9cd316bd94f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89loi=20Rivard?= Date: Thu, 7 Mar 2024 18:52:23 +0100 Subject: [PATCH] chore: pre-commit update --- .pre-commit-config.yaml | 4 ++-- tests/app/test_mails.py | 6 +++--- tests/backends/ldap/test_install.py | 6 +++--- tests/backends/ldap/test_utils.py | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 436548b8..14558603 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ --- repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.2.1' + rev: 'v0.3.1' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -25,7 +25,7 @@ repos: hooks: - id: docformatter - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.15.1 hooks: - id: pyupgrade args: ["--py38-plus"] diff --git a/tests/app/test_mails.py b/tests/app/test_mails.py index bd10697e..1ce3c964 100644 --- a/tests/app/test_mails.py +++ b/tests/app/test_mails.py @@ -146,9 +146,9 @@ def test_mail_with_logo_in_http(testclient, logged_admin, smtpd, httpserver): raw_logo = fd.read() httpserver.expect_request(logo_path).respond_with_data(raw_logo) - testclient.app.config[ - "LOGO" - ] = f"http://{httpserver.host}:{httpserver.port}{logo_path}" + testclient.app.config["LOGO"] = ( + f"http://{httpserver.host}:{httpserver.port}{logo_path}" + ) assert len(smtpd.messages) == 0 res = testclient.get("/admin/mail") diff --git a/tests/backends/ldap/test_install.py b/tests/backends/ldap/test_install.py index 90afeb70..3db3f64c 100644 --- a/tests/backends/ldap/test_install.py +++ b/tests/backends/ldap/test_install.py @@ -79,9 +79,9 @@ def test_install_schemas_twice(configuration, slapd_server): def test_install_no_permissions_to_install_schemas(configuration, slapd_server): configuration["BACKENDS"]["LDAP"]["ROOT_DN"] = slapd_server.suffix configuration["BACKENDS"]["LDAP"]["URI"] = slapd_server.ldap_uri - configuration["BACKENDS"]["LDAP"][ - "BIND_DN" - ] = "uid=admin,ou=users,dc=mydomain,dc=tld" + configuration["BACKENDS"]["LDAP"]["BIND_DN"] = ( + "uid=admin,ou=users,dc=mydomain,dc=tld" + ) configuration["BACKENDS"]["LDAP"]["BIND_PW"] = "admin" with Backend(configuration).session(): diff --git a/tests/backends/ldap/test_utils.py b/tests/backends/ldap/test_utils.py index c7944a34..ed548f73 100644 --- a/tests/backends/ldap/test_utils.py +++ b/tests/backends/ldap/test_utils.py @@ -306,8 +306,8 @@ def test_login_placeholder(testclient): placeholder = testclient.get("/login").form["login"].attrs["placeholder"] assert placeholder == "john@doe.com" - testclient.app.config["BACKENDS"]["LDAP"][ - "USER_FILTER" - ] = "(|(uid={{ login }})(mail={{ login }}))" + testclient.app.config["BACKENDS"]["LDAP"]["USER_FILTER"] = ( + "(|(uid={{ login }})(mail={{ login }}))" + ) placeholder = testclient.get("/login").form["login"].attrs["placeholder"] assert placeholder == "jdoe or john@doe.com"