Skip to content

Commit 2d57d6e

Browse files
committed
docs(typing): Update _FieldEqualType
Think this makes it clearer how each of these align
1 parent d640933 commit 2d57d6e

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

altair/vegalite/v5/api.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -543,11 +543,18 @@ def check_fields_and_encodings(parameter: Parameter, field_name: str) -> bool:
543543

544544

545545
_FieldEqualType: TypeAlias = Union["IntoExpression", Parameter, SchemaBase]
546-
"""Permitted types for equality checks on field values:
546+
"""
547+
Permitted types for equality checks on field values.
548+
549+
Applies to the following context(s):
550+
551+
import altair as alt
547552
548-
- `datum.field == ...`
549-
- `FieldEqualPredicate(equal=...)`
550-
- `when(**constraints=...)`
553+
alt.datum.field == ...
554+
alt.FieldEqualPredicate(field="field", equal=...)
555+
alt.when(field=...)
556+
alt.when().then().when(field=...)
557+
alt.Chart.transform_filter(field=...)
551558
"""
552559

553560

0 commit comments

Comments
 (0)