Skip to content

Commit

Permalink
Type hints: Simplify to improve user experiences (#3307)
Browse files Browse the repository at this point in the history
* Switch to SchemaBase instead of specific Altair classes

* Same for docstrings

* Simplify dictionaries in docstrings

* Fix deduplication of type hints

* Sort types by length to show str, float, etc. before core.SchemaBase and core._Parameter

* Make order of type hints deterministic

* Remove Union within Union due to UndefinedType

* Remove unnecessary class name + dict from beginning of docstrings

* Remove unused type ignore comment

* Keep all class names in docstrings
  • Loading branch information
binste authored Jan 9, 2024
1 parent 1115731 commit 5e03173
Show file tree
Hide file tree
Showing 7 changed files with 79,711 additions and 99,303 deletions.
2 changes: 1 addition & 1 deletion altair/vegalite/v5/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def param(
name=parameter.name,
bind=bind,
value=value,
expr=expr, # type: ignore[arg-type]
expr=expr,
**kwds,
)
parameter.param_type = "variable"
Expand Down
103,078 changes: 46,212 additions & 56,866 deletions altair/vegalite/v5/schema/channels.py

Large diffs are not rendered by default.

55,443 changes: 23,914 additions & 31,529 deletions altair/vegalite/v5/schema/core.py

Large diffs are not rendered by default.

Loading

0 comments on commit 5e03173

Please sign in to comment.