Skip to content

refactor: drop the CompactionOptions cast - #5305

Open
jonasdedden wants to merge 1 commit into
lance-format:mainfrom
jonasdedden:refactor/compaction-options-cast
Open

jonasdedden wants to merge 1 commit into
lance-format:mainfrom
jonasdedden:refactor/compaction-options-cast

Conversation

@jonasdedden

Copy link
Copy Markdown
Contributor

Summary

Part 3/3 of splitting up #5301. pylance 12 declares CompactionOptions as TypedDict(total=False). An empty dict and partial CompactionOptions(...) literals now type-check, so the cast in compact_files and the test-only _compaction_options cast helper are no longer needed.

No behavior change. pyproject.toml and uv.lock are untouched.

Testing

  • uv run mypy (strict), ruff check, ruff format --check: clean
  • pytest tests/test_distributed_compaction.py: 14 passed
  • Full suite with all three split PRs combined: 299 passed, 0 skipped (pylance 12.0.0, Python 3.12)

pylance 12 declares `CompactionOptions` as `TypedDict(total=False)`, so an
empty dict and partial `CompactionOptions(...)` literals type-check without
casting. Remove the cast in `compact_files` and the test-only
`_compaction_options` helper.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@jonasdedden

Copy link
Copy Markdown
Contributor Author

@jiaoew1991 @yanghua some small simplification PR

#5304 and #5303 also remove way more effectively dead code, they are a bit harder to review

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.

1 participant