Repository navigation
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
e3bf24a to
693f70a
Compare
SkyeAv
left a comment
There was a problem hiding this comment.
Thanks for the contribution, @ArdaTkn! The alias looks clean and matches #286, but the discriminator makes this a breaking change rather than a pure refactor: kind is now effectively required. Every kind field has a default (src/tablassert/models.py:276-300), so the old plain union accepted configs omitting it; {"source": {"path": "p.csv"}} validated as Excel. With the discriminator the same payload now fails with union_tag_not_found. Before merging, please:
- Update
docs/configuration/table.md:94,:121, and thekindcallout at:114-115, which still documentkindas optional and claim an omittedkindis accepted. - Note the breaking nature in the
Unreleasedchangelog entry: configs omittingkindnow fail validation. The PR title should be breaking-marked too (refactor!:).
Verified locally on pydantic v2; targeted checks otherwise pass.
693f70a to
4b4bea3
Compare
|
Addressed all review items in
Local gates re-run and passing: |
4b4bea3 to
1edc525
Compare
Closes #286.
Summary
Source: TypeAlias = Annotated[Excel | Text | Parquet | IPC | NDJSON, Field(discriminator="kind")]insrc/tablassert/models.py.Excel | Text | Parquet | IPC | NDJSONunions in_section_source_labelandSection.sourcewithSource.Unreleasedchangelog entry inCHANGELOG.md.Local gate
scripts/check_changelog.py --base upstream/main: PASSruff check ./ruff format --check .: cleanpyright: 0 errorsvulture/deptry .: cleanpytest -q: 1397 passed (3 pre-existing macOS-only errno/semaphore failures)