Tighten ruff rules and modernize style

This commit is contained in:
James R. Barlow
2026-01-27 14:04:52 -08:00
parent 6b37583674
commit c5d3ef4b17
22 changed files with 104 additions and 77 deletions
+2 -6
View File
@@ -3,9 +3,8 @@
from __future__ import annotations
import datetime
import datetime as dt
import warnings
from datetime import timezone
from shutil import copyfile
import pikepdf
@@ -198,10 +197,7 @@ def test_creation_date_preserved(output_type, resources, infile, outpdf):
# We expect that the modified date is quite recent
date_after = decode_pdf_date(str(after['/ModDate']))
assert (
seconds_between_dates(date_after, datetime.datetime.now(timezone.utc))
< 1000
)
assert seconds_between_dates(date_after, dt.datetime.now(dt.UTC)) < 1000
@pytest.fixture