style: apply ruff format to all source files
This commit is contained in:
@@ -134,7 +134,9 @@ def odt_formatter():
|
||||
)
|
||||
),
|
||||
):
|
||||
yield ODTFormatter(author="Тест Автор", from_date="2026-01-01", to_date="2026-01-31")
|
||||
yield ODTFormatter(
|
||||
author="Тест Автор", from_date="2026-01-01", to_date="2026-01-31"
|
||||
)
|
||||
|
||||
|
||||
# -- Тесты упаковки formatters как полноценного пакета --
|
||||
@@ -171,7 +173,11 @@ def _simulate_missing_odfpy():
|
||||
|
||||
saved = {}
|
||||
for key in list(sys.modules.keys()):
|
||||
if key == "odf" or key.startswith("odf.") or key == "redmine_reporter.formatters.odt":
|
||||
if (
|
||||
key == "odf"
|
||||
or key.startswith("odf.")
|
||||
or key == "redmine_reporter.formatters.odt"
|
||||
):
|
||||
saved[key] = sys.modules.pop(key)
|
||||
return saved
|
||||
|
||||
@@ -474,7 +480,9 @@ def test_odt_empty_author_no_garbage_in_header(fake_rows):
|
||||
)
|
||||
),
|
||||
):
|
||||
formatter = ODTFormatter(author="", from_date="2026-01-01", to_date="2026-01-31")
|
||||
formatter = ODTFormatter(
|
||||
author="", from_date="2026-01-01", to_date="2026-01-31"
|
||||
)
|
||||
doc = formatter.format(fake_rows)
|
||||
|
||||
from odf.text import P
|
||||
@@ -501,7 +509,9 @@ def test_odt_formatter_save_creates_valid_file(fake_rows, tmp_path):
|
||||
)
|
||||
),
|
||||
):
|
||||
formatter = ODTFormatter(author="Тест", from_date="2026-01-01", to_date="2026-01-31")
|
||||
formatter = ODTFormatter(
|
||||
author="Тест", from_date="2026-01-01", to_date="2026-01-31"
|
||||
)
|
||||
output_file = tmp_path / "report.odt"
|
||||
formatter.save(fake_rows, str(output_file))
|
||||
|
||||
@@ -537,7 +547,9 @@ def test_odt_has_covered_cells_for_spans(fake_rows):
|
||||
)
|
||||
),
|
||||
):
|
||||
formatter = ODTFormatter(author="Тест", from_date="2026-01-01", to_date="2026-01-31")
|
||||
formatter = ODTFormatter(
|
||||
author="Тест", from_date="2026-01-01", to_date="2026-01-31"
|
||||
)
|
||||
doc = formatter.format(fake_rows)
|
||||
|
||||
from odf.table import CoveredTableCell
|
||||
|
||||
Reference in New Issue
Block a user