Skip to content

Commit 6da378b

Browse files
authored
Improve type hints and add py.typed files (#389)
* Mirror the md documentation with py scripts * New option warn_on_unexpected_option_type * More type hints, use Sequence rather than list * Add py.typed files * Version 2.4.1-dev
1 parent 9923305 commit 6da378b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+2852
-123
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,5 @@ repos:
3333
rev: v1.17.1
3434
hooks:
3535
- id: jupytext
36-
exclude: packages/
37-
types: ["markdown"]
38-
args: ["--pipe", "isort {} --treat-comment-as-code '# %%' --profile black", "--pipe", "black", "--check", "ruff check {} --ignore E402"]
39-
additional_dependencies:
40-
- black==24.4.2 # Matches hook
41-
- ruff==0.4.3
42-
- isort==5.13.2
36+
types: ["python"]
37+
args: ["--sync", "--quiet"]

docs/apps/dash.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
jupytext:
3-
formats: md:myst
3+
formats: docs///md:myst,docs/py///py:percent
44
notebook_metadata_filter: -jupytext.text_representation.jupytext_version
55
text_representation:
66
extension: .md

docs/apps/html.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
jupytext:
3-
formats: md:myst
3+
formats: docs///md:myst,docs/py///py:percent
44
notebook_metadata_filter: -jupytext.text_representation.jupytext_version
55
text_representation:
66
extension: .md

docs/apps/marimo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
jupytext:
3-
formats: md:myst
3+
formats: docs///md:myst,docs/py///py:percent
44
notebook_metadata_filter: -jupytext.text_representation.jupytext_version
55
text_representation:
66
extension: .md

docs/apps/notebook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
jupytext:
3-
formats: md:myst
3+
formats: docs///md:myst,docs/py///py:percent
44
notebook_metadata_filter: -jupytext.text_representation.jupytext_version
55
text_representation:
66
extension: .md

docs/apps/widget.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
jupytext:
3-
formats: md:myst
3+
formats: docs///md:myst,docs/py///py:percent
44
notebook_metadata_filter: -jupytext.text_representation.jupytext_version
55
text_representation:
66
extension: .md
@@ -12,6 +12,13 @@ kernelspec:
1212
name: itables
1313
---
1414

15+
```{code-cell} ipython3
16+
:tags: [remove-cell]
17+
18+
# ruff: noqa: E402
19+
# pyright: reportUnusedExpression=false
20+
```
21+
1522
# Widget
1623

1724
The `ITable` widget depends on [AnyWidget](https://anywidget.dev) -

docs/changelog.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
ITables ChangeLog
22
=================
33

4+
2.4.1-dev (2025-06-??)
5+
----------------------
6+
7+
**Added**
8+
- We now enforce `pyright` on the ITables documentation
9+
10+
**Changed**
11+
- The `warn_on_undocumented_option` option now defaults to `True` and only check the option names
12+
- We have added a new option `warn_on_unexpected_option_type` that defaults to `warn_on_undocumented_option` when `typeguard>=4.4.1` is installed (`False` otherwise)
13+
14+
**Fixed**
15+
- We have added type hints to `itable.options` even for the options that don't have a default value ([#224](https://github.com/mwouts/itables/issues/224))
16+
17+
418
2.4.0 (2025-05-17)
519
------------------
620

docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
jupytext:
3-
formats: md:myst
3+
formats: docs///md:myst,docs/py///py:percent
44
notebook_metadata_filter: -jupytext.text_representation.jupytext_version
55
text_representation:
66
extension: .md

docs/css.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
jupytext:
3-
formats: md:myst
3+
formats: docs///md:myst,docs/py///py:percent
44
notebook_metadata_filter: -jupytext.text_representation.jupytext_version
55
text_representation:
66
extension: .md
@@ -12,6 +12,12 @@ kernelspec:
1212
name: itables
1313
---
1414

15+
```{code-cell} ipython3
16+
:tags: [remove-cell]
17+
18+
# ruff: noqa: E402
19+
```
20+
1521
# CSS
1622

1723
You can use CSS to alter how tables are rendered.

docs/custom_extensions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
jupytext:
3-
formats: md:myst
3+
formats: docs///md:myst,docs/py///py:percent
44
notebook_metadata_filter: -jupytext.text_representation.jupytext_version
55
text_representation:
66
extension: .md

0 commit comments

Comments
 (0)