mirror of
https://github.com/jsvine/pdfplumber.git
synced 2026-08-30 09:00:24 +08:00
9587cc7d22
A fairly large commit, adding type annotations/hints to the entire library, and refactoring the library accordingly. Most of the refactoring changes should have no practical effect on usage, but several others are notable: - Added `TableSettings` class, a behind-the-scenes handler for managing and validating table-extraction settings. - Renamed the positional argument to `.to_csv(...)` and `.to_json(...)` from `types` to `object_types`. - Tweaked the output of `.to_json(...)` so that, if an object type is not present for a given page, it has no key in the page's object representation. - Removed `utils.filter_objects(...)` and move the functionality to within the `FilteredPage.objects` property calculation, the only part of the library that used it. - Removed code that sets `pdfminer.pdftypes.STRICT = True` and `pdfminer.pdfinterp.STRICT = True`, since that [has now been the default for a while](https://github.com/pdfminer/pdfminer.six/commit/9439a3a31a347836aad1c1226168156125d9505f).