Skip to content

Commit

Permalink
docs: Update (_Condition|Conditions) aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
dangotbanned committed Sep 16, 2024
1 parent 7865c91 commit 0a93309
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions altair/vegalite/v5/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,19 @@ class _ConditionExtra(TypedDict, closed=True, total=False): # type: ignore[call


_Condition: TypeAlias = _ConditionExtra
"""A singular, non-chainable condition produced by ``.when()``."""
"""
A singular, *possibly* non-chainable condition produced by ``.when()``.
The default **permissive** representation.
Allows arbitrary additional keys that *may* be present in a `Conditional Field`_
but not a `Conditional Value`_.
.. _Conditional Field:
https://vega.github.io/vega-lite/docs/condition.html#field
.. _Conditional Value:
https://vega.github.io/vega-lite/docs/condition.html#value
"""


class _ConditionClosed(TypedDict, closed=True, total=False): # type: ignore[call-arg]
Expand All @@ -650,7 +662,14 @@ class _ConditionClosed(TypedDict, closed=True, total=False): # type: ignore[cal


_Conditions: TypeAlias = t.List[_ConditionClosed]
"""Chainable conditions produced by ``.when()`` and ``Then.when()``."""
"""
Chainable conditions produced by ``.when()`` and ``Then.when()``.
All must be a `Conditional Value`_.
.. _Conditional Value:
https://vega.github.io/vega-lite/docs/condition.html#value
"""

_C = TypeVar("_C", _Conditions, _Condition)

Expand Down

0 comments on commit 0a93309

Please sign in to comment.