Skip to content

Commit

Permalink
Ruff fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Menghuan1918 committed Oct 18, 2024
1 parent 6e293a5 commit 7e70bed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/pdfdeal/Doc2X/ConvertV1.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
"V1 API is deprecated and will be removed in a future version. "
"Use V2 API instead.",
DeprecationWarning,
stacklevel=2
stacklevel=2,
)


@async_retry()
async def refresh_key(key: str) -> str:
"""Get the real key by the personal key
Expand Down
2 changes: 2 additions & 0 deletions src/pdfdeal/FileTools/file_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def clean_text(text):
Clean the text
"""
import emoji

# remove extra whitespaces
text = re.sub(r"\n\s*\n", "\n\n", text)

Expand Down Expand Up @@ -62,6 +63,7 @@ def extract_text_and_images(pdf_path, ocr, language=["ch_sim", "en"], GPU=False)
"""
from pypdf import PdfReader
from PIL import Image

Text = []

# Open the PDF file
Expand Down
2 changes: 1 addition & 1 deletion src/pdfdeal/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .doc2x import Doc2X

__all__ = ["Doc2X"]
__all__ = ["Doc2X"]

0 comments on commit 7e70bed

Please sign in to comment.