Skip to content
This repository was archived by the owner on Apr 11, 2025. It is now read-only.

Commit 3d83b22

Browse files
committed
Flake8 fixes base parser
1 parent 76c8c65 commit 3d83b22

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

camelot/parsers/base.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,12 @@ def _document_has_no_text(self):
113113
rootname = os.path.basename(self.rootname)
114114
if self.images:
115115
warnings.warn(
116-
"{rootname} is image-based, "
117-
"pypdf_table_extraction only works on text-based pages.".format(
118-
rootname=rootname
119-
)
116+
f"{rootname} is image-based, "
117+
"pypdf_table_extraction only works on text-based pages.",
118+
stacklevel=1,
120119
)
121120
else:
122-
warnings.warn(f"No tables found on {rootname}")
121+
warnings.warn(f"No tables found on {rootname}", stacklevel=2)
123122
return True
124123
return False
125124

0 commit comments

Comments
 (0)