Chore: ruff 0.16 upgrade (#13531)

This commit is contained in:
Trenton H
2026-08-03 21:00:04 +00:00
committed by GitHub
parent 23c11f49d0
commit dd99c2289d
6 changed files with 31 additions and 29 deletions
+4 -5
View File
@@ -300,7 +300,7 @@ def consumable_document_matches_workflow(
]:
reason = (
f"Document source {document.source.name} not in"
f" {[DocumentSource(int(x)).name for x in trigger.sources]}",
f" {[DocumentSource(int(x)).name for x in trigger.sources]}"
)
trigger_matched = False
@@ -310,8 +310,7 @@ def consumable_document_matches_workflow(
and document.mailrule_id != trigger.filter_mailrule.pk
):
reason = (
f"Document mail rule {document.mailrule_id}"
f" != {trigger.filter_mailrule.pk}",
f"Document mail rule {document.mailrule_id} != {trigger.filter_mailrule.pk}"
)
trigger_matched = False
@@ -326,7 +325,7 @@ def consumable_document_matches_workflow(
):
reason = (
f"Document filename {document.original_file.name} does not match"
f" {trigger.filter_filename.lower()}",
f" {trigger.filter_filename.lower()}"
)
trigger_matched = False
@@ -349,7 +348,7 @@ def consumable_document_matches_workflow(
):
reason = (
f"Document path {document.original_file}"
f" does not match {trigger.filter_path}",
f" does not match {trigger.filter_path}"
)
trigger_matched = False
+5 -3
View File
@@ -341,9 +341,11 @@ class TestTranslateQuery:
("tag:foo,type:bar", "tag:foo AND document_type:bar"),
(
"created:[2020 TO 2021],added:[2022 TO 2023]",
"created:[2020-01-01T00:00:00Z TO 2022-01-01T00:00:00Z}"
" AND "
"added:[2022-01-01T00:00:00Z TO 2024-01-01T00:00:00Z}",
(
"created:[2020-01-01T00:00:00Z TO 2022-01-01T00:00:00Z}"
" AND "
"added:[2022-01-01T00:00:00Z TO 2024-01-01T00:00:00Z}"
),
),
# correspondent is not multi-value: comma stays literal inside the value
("correspondent:foo,bar", "correspondent:foo,bar"),
+1 -1
View File
@@ -160,7 +160,7 @@ class TestDateLocalization:
)
def test_localize_date_raises_type_error_for_invalid_input(
self,
invalid_value: None | list[object] | dict[Any, Any] | Literal[1698330605],
invalid_value: list[object] | dict[Any, Any] | Literal[1698330605] | None,
) -> None:
with pytest.raises(TypeError) as excinfo:
localize_date(invalid_value, "medium", "en_US")