diff --git a/.github/workflows/python-lint.yml b/.github/workflows/python-lint.yml index c7e6465..8e01f67 100644 --- a/.github/workflows/python-lint.yml +++ b/.github/workflows/python-lint.yml @@ -24,7 +24,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pylint + pip install pylint pillow pytesseract opencv-python-headless numpy - name: Lint with pylint run: | diff --git a/OCR4Linux.py b/OCR4Linux.py index 95c2d93..9c8cd35 100644 --- a/OCR4Linux.py +++ b/OCR4Linux.py @@ -50,7 +50,7 @@ def extract_text_with_lines(self, image): # Group text by line lines = {} - for i, level in enumerate(data['level']): + for i, _ in enumerate(data['level']): if int(data['conf'][i]) > 60: # Filter low confidence results page_num = data['page_num'][i] block_num = data['block_num'][i] @@ -100,7 +100,7 @@ def main(self): return 0 except Exception as e: - print(f"Error processing image: {str(e)}") + print(f"Error processing image because: {str(e)}") return 1