Skip to content

Commit

Permalink
docs(typing): Update _FieldEqualType
Browse files Browse the repository at this point in the history
Think this makes it clearer how each of these align
  • Loading branch information
dangotbanned committed Nov 4, 2024
1 parent d640933 commit 2d57d6e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions altair/vegalite/v5/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,11 +543,18 @@ def check_fields_and_encodings(parameter: Parameter, field_name: str) -> bool:


_FieldEqualType: TypeAlias = Union["IntoExpression", Parameter, SchemaBase]
"""Permitted types for equality checks on field values:
"""
Permitted types for equality checks on field values.
Applies to the following context(s):
import altair as alt
- `datum.field == ...`
- `FieldEqualPredicate(equal=...)`
- `when(**constraints=...)`
alt.datum.field == ...
alt.FieldEqualPredicate(field="field", equal=...)
alt.when(field=...)
alt.when().then().when(field=...)
alt.Chart.transform_filter(field=...)
"""


Expand Down

0 comments on commit 2d57d6e

Please sign in to comment.