1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-04 21:15:22 +02:00

chore: upgrade pre-commit hooks (#1735)

* change pep585 hook to pyupgrade

* run pyupgrade + cleanup lint errors
This commit is contained in:
Hayden 2022-10-17 14:37:06 -08:00 committed by GitHub
parent e516a2e801
commit a8f0fb14a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 79 additions and 83 deletions

View file

@ -11,7 +11,7 @@ ocr_service = OcrService()
def test_image_to_string():
with open(Path("tests/data/images/test-ocr.png"), "rb") as image:
result = ocr_service.image_to_string(image)
with open(Path("tests/data/text/test-ocr.txt"), "r", encoding="utf-8") as expected_result:
with open(Path("tests/data/text/test-ocr.txt"), encoding="utf-8") as expected_result:
assert result == expected_result.read()
@ -19,7 +19,7 @@ def test_image_to_string():
def test_image_to_tsv():
with open(Path("tests/data/images/test-ocr.png"), "rb") as image:
result = ocr_service.image_to_tsv(image.read())
with open(Path("tests/data/text/test-ocr.tsv"), "r", encoding="utf-8") as expected_result:
with open(Path("tests/data/text/test-ocr.tsv"), encoding="utf-8") as expected_result:
assert result == expected_result.read()