mirror of
https://github.com/jsvine/pdfplumber.git
synced 2026-08-30 00:50:24 +08:00
Fix #659 (PageImage.debug_tablefinder())
Thanks to @rneumann7 for flagging!
This commit is contained in:
@@ -2,6 +2,12 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
||||
|
||||
## [0.7.1] - 2022-05-31
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix bug when calling `PageImage.debug_tablefinder()` (i.e., with no parameters). ([#659](https://github.com/jsvine/pdfplumber/issues/659)) [h/t @rneumann7]
|
||||
|
||||
## [0.7.0] - 2022-05-27
|
||||
|
||||
### Added
|
||||
|
||||
@@ -282,7 +282,7 @@ class PageImage:
|
||||
) -> "PageImage":
|
||||
if isinstance(tf, TableFinder):
|
||||
finder = tf
|
||||
elif isinstance(tf, (TableSettings, dict)):
|
||||
elif tf is None or isinstance(tf, (TableSettings, dict)):
|
||||
finder = self.page.debug_tablefinder(tf)
|
||||
else:
|
||||
raise ValueError(
|
||||
|
||||
@@ -40,6 +40,8 @@ class Test(unittest.TestCase):
|
||||
finder = TableFinder(self.im.page, settings)
|
||||
self.im.debug_tablefinder(finder)
|
||||
|
||||
self.im.debug_tablefinder(None)
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
self.im.debug_tablefinder(0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user