Skip to content

Check the option names and types when options are set (#601) - #609

Merged
mwouts merged 1 commit into
mainfrom
fix_601
Jul 22, 2026
Merged

Check the option names and types when options are set (#601)#609
mwouts merged 1 commit into
mainfrom
fix_601

Conversation

@mwouts

@mwouts mwouts commented Jul 22, 2026

Copy link
Copy Markdown
Owner

itables.options is now an instance of a ModuleType subclass that checks the option name and type on assignment, so that a typo in an option name, or an option with an unexpected type, is reported at the assignment itself rather than (possibly much later) when a table is rendered.

The options passed to e.g. show are now checked before itables transforms them, so that the warning quotes the option as the user wrote it, and every item of a collection is now checked rather than just the first one.

itables.options is now an instance of a ModuleType subclass that checks
the option name and type on assignment, so that a typo in an option name,
or an option with an unexpected type, is reported at the assignment
itself rather than (possibly much later) when a table is rendered.

The options passed to e.g. show are now checked before itables transforms
them, so that the warning quotes the option as the user wrote it, and
every item of a collection is now checked rather than just the first one.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Thank you for making this pull request.

Did you know? You can try it on Binder: Binder:lab.

Also, the version of ITables developed in this PR is available as a wheel artifact 📦 for easy installation.
Download it here, unzip it and then run pip install itables-xxx.whl in the unzipped directory.

A conda package is also available for easy installation:
Download it here, and then run conda install itables-xxx.tar.bz2 in the directory where you downloaded the file.

@mwouts
mwouts merged commit 64e336b into main Jul 22, 2026
26 checks passed
@mwouts
mwouts deleted the fix_601 branch July 22, 2026 20:52
@codecov-commenter

codecov-commenter commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.82609% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.22%. Comparing base (b091e1a) to head (fc16c4f).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/itables/options.py 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #609      +/-   ##
==========================================
+ Coverage   95.20%   95.22%   +0.02%     
==========================================
  Files          59       59              
  Lines        3668     3710      +42     
==========================================
+ Hits         3492     3533      +41     
- Misses        176      177       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants