Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 17, 2024
1 parent ead3463 commit d36e2d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/AutoSplitImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def __region(self, region: str):
self.__yy = int(r[3])

def __read_text(self, path: str):
with open(path, mode="r", encoding="utf-8") as f:
with open(path, encoding="utf-8") as f:
self.text = f.read().lower().strip()

def __read_image_bytes(self, path: str):
Expand Down
5 changes: 3 additions & 2 deletions src/compare.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from utils import BGRA_CHANNEL_COUNT, MAXBYTE, ColorChannel, ImageShape, is_valid_image
import Levenshtein
from math import sqrt

import cv2
import Levenshtein
import numpy as np

# TODO: easyocr vs. pytesseract?
Expand All @@ -14,6 +13,8 @@
from PIL import Image

Check warning on line 13 in src/compare.py

View workflow job for this annotation

GitHub Actions / Pyright (windows-latest, 3.12)

Import "PIL" could not be resolved from source (reportMissingModuleSource)

Check warning on line 13 in src/compare.py

View workflow job for this annotation

GitHub Actions / Pyright (windows-latest, 3.12)

Import "PIL.Image" could not be resolved from source (reportMissingModuleSource)

Check warning on line 13 in src/compare.py

View workflow job for this annotation

GitHub Actions / Pyright (windows-latest, 3.11)

Import "PIL" could not be resolved from source (reportMissingModuleSource)

Check warning on line 13 in src/compare.py

View workflow job for this annotation

GitHub Actions / Pyright (windows-latest, 3.11)

Import "PIL.Image" could not be resolved from source (reportMissingModuleSource)

Check warning on line 13 in src/compare.py

View workflow job for this annotation

GitHub Actions / Pyright (windows-latest, 3.10)

Import "PIL" could not be resolved from source (reportMissingModuleSource)

Check warning on line 13 in src/compare.py

View workflow job for this annotation

GitHub Actions / Pyright (windows-latest, 3.10)

Import "PIL.Image" could not be resolved from source (reportMissingModuleSource)
from scipy import fft

from utils import BGRA_CHANNEL_COUNT, MAXBYTE, ColorChannel, ImageShape, is_valid_image

# TODO: make me configureable
pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract"

Expand Down

0 comments on commit d36e2d4

Please sign in to comment.