chore: pre-commit update

This commit is contained in:
Éloi Rivard 2024-03-07 18:52:23 +01:00
parent 9af9a303ba
commit bd57d69765
No known key found for this signature in database
GPG key ID: 7EDA204EA57DD184
4 changed files with 11 additions and 11 deletions

View file

@ -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"]

View file

@ -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")

View file

@ -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():

View file

@ -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"