Skip to content

Conversation

@mwouts
Copy link
Owner

@mwouts mwouts commented May 31, 2025

This PR ensures that the type checks pass in strict mode when run on the ITables documentation.

Closes #395

@mwouts mwouts requested a review from Copilot May 31, 2025 20:45
@github-actions
Copy link

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 can be installed with pip:

pip install git+https://github.com/mwouts/itables.git@strict_type_checking_in_docs

(this requires nodejs, see more at Developing ITables)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enforces strict Pyright type checking in the ITables documentation by adding per-file ignore directives, updating code examples to match the latest API, and scoping Jupytext pre-commit hooks to docs.

  • Added # pyright: ...=false directives across Markdown and Python docs to suppress expected type errors.
  • Updated sample DataFrame initializations and replaced get_dict_of_test_dfs(polars=True) with get_dict_of_polars_test_dfs().
  • Modified .pre-commit-config.yaml to run Jupytext only on docs/ and streamlined its arguments.

Reviewed Changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
docs/troubleshooting.md Added reportDuplicateImport=false directive
docs/py/troubleshooting.py Added reportDuplicateImport=false directive
docs/py/polars_dataframes.py Switched to get_dict_of_polars_test_dfs()
docs/polars_dataframes.md Switched to get_dict_of_polars_test_dfs()
docs/py/pandas_style.py Added reportUnknownMemberType=false directive
docs/pandas_style.md Added reportUnknownMemberType=false directive
docs/py/options/row_group.py Added code-cell tag and ignore for member type
docs/options/row_group.md Wrapped example in code-cell and added member-type ignore
docs/py/options/order.py Refactored .set_index() to constructor index= parameter
docs/options/order.md Refactored .set_index() to constructor index= parameter
docs/py/options/allow_html.py Added multiple reportUnknown* ignore directives
docs/options/allow_html.md Wrapped example in code-cell and added ignore directives
docs/py/css.py Added reportUnknownVariableType=false directive
docs/css.md Added reportUnknownVariableType=false directive
docs/py/contributing.py Added reportUnknownVariableType=false directive
docs/contributing.md Wrapped example in code-cell and added ignore directive
docs/py/apps/html.py Added reportUnknownVariableType=false directive
docs/apps/html.md Wrapped example in code-cell and added ignore directive
docs/changelog.md Updated changelog to reference issue link
.pre-commit-config.yaml Scoped Jupytext hook to docs/ and removed --quiet arg
Comments suppressed due to low confidence (1)

.pre-commit-config.yaml:37

  • [nitpick] Removing the --quiet flag may increase noise during pre-commit runs; consider re-adding it or documenting the expected verbosity change.
args: ["--sync"]

Comment on lines +19 to 20
# pyright: reportUnknownVariableType=false

Copy link

Copilot AI May 31, 2025

Choose a reason for hiding this comment

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

There are many repeated inline Pyright ignore directives across documentation files; consider centralizing these rules in a pyrightconfig.json to reduce boilerplate and improve maintainability.

Suggested change
# pyright: reportUnknownVariableType=false

Copilot uses AI. Check for mistakes.
@codecov-commenter
Copy link

codecov-commenter commented May 31, 2025

Codecov Report

Attention: Patch coverage is 98.57143% with 1 line in your changes missing coverage. Please review.

Project coverage is 89.63%. Comparing base (2033377) to head (88e5957).

Files with missing lines Patch % Lines
src/itables_for_dash/properties.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #400      +/-   ##
==========================================
+ Coverage   89.39%   89.63%   +0.23%     
==========================================
  Files          44       44              
  Lines        1858     1852       -6     
==========================================
- Hits         1661     1660       -1     
+ Misses        197      192       -5     

☔ View full report in Codecov by Sentry.
📢 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.

@mwouts mwouts force-pushed the strict_type_checking_in_docs branch from f85d406 to 88e5957 Compare May 31, 2025 20:53
@mwouts mwouts merged commit 8fa250a into main May 31, 2025
15 checks passed
@mwouts mwouts deleted the strict_type_checking_in_docs branch May 31, 2025 20:58
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.

Enforce strict type checking on the documentation

3 participants