Skip to content

Commit

Permalink
remove unused links param (#3001)
Browse files Browse the repository at this point in the history
The `links` param in `partition_pdf` was never used by the partitioner,
but added when that metadata element was created. This removes the
unused parameter since `links` are extracted during partitioning.
  • Loading branch information
Coniferish authored May 10, 2024
1 parent f8c119a commit 293a4a1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 0.13.8-dev2
## 0.13.8-dev3

### Enhancements

Expand All @@ -11,6 +11,7 @@
* **Add missing starting_page_num param to partition_image**
* **Make the filename and file params for partition_image and partition_pdf match the other partitioners**
* **Re-apply: skip accuracy calculation feature** Overwritten by mistake
* **Remove links param from partition_pdf** `links` is extracted during partitioning and is not needed as a paramter in partition_pdf.

## 0.13.7

Expand Down
2 changes: 1 addition & 1 deletion unstructured/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.13.8-dev2" # pragma: no cover
__version__ = "0.13.8-dev3" # pragma: no cover
3 changes: 1 addition & 2 deletions unstructured/partition/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os
import re
import warnings
from typing import IO, TYPE_CHECKING, Any, Iterator, Optional, Sequence, cast
from typing import IO, TYPE_CHECKING, Any, Iterator, Optional, cast

import numpy as np
import pdf2image
Expand Down Expand Up @@ -128,7 +128,6 @@ def partition_pdf(
metadata_filename: Optional[str] = None, # used by decorator
metadata_last_modified: Optional[str] = None,
chunking_strategy: Optional[str] = None, # used by decorator
links: Sequence[Link] = [],
hi_res_model_name: Optional[str] = None,
extract_images_in_pdf: bool = False,
extract_image_block_types: Optional[list[str]] = None,
Expand Down

0 comments on commit 293a4a1

Please sign in to comment.