Skip to content

fix: switch skip_infer_table_types default to None - #4464

Open
TrueFurina wants to merge 1 commit into
Unstructured-IO:mainfrom
TrueFurina:fix/skip-infer-table-types-default
Open

fix: switch skip_infer_table_types default to None#4464
TrueFurina wants to merge 1 commit into
Unstructured-IO:mainfrom
TrueFurina:fix/skip-infer-table-types-default

Conversation

@TrueFurina

@TrueFurina TrueFurina commented Aug 29, 2026

Copy link
Copy Markdown

Summary

Closes #3063: switch the skip_infer_table_types default from a hard-coded list to None, and set the actual default inside partition().

Changes

  • unstructured/partition/auto.py:
    • partition() signature: skip_infer_table_types: Optional[list[str]] = None (was ["pdf", "jpg", "png", "heic"])
    • Inside partition(): normalize None["pdf", "jpg", "png", "heic"] before it reaches decide_table_extraction(), so callers can distinguish an explicit value from the default

Verification

  • ast.parse passes
  • Local assertions cover 3 scenarios:
    • Default (None): pdf skipped for table inference, docx inferred (unchanged behavior)
    • Explicit []: pdf inferred too (no types skipped)
    • Custom ["docx"]: docx skipped, pdf inferred
  • Behavior for callers that pass an explicit list is byte-for-byte unchanged

Review in cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch skip_infer_table_types default to None instead of list

1 participant