You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
self, statement: str, *, str_as_lit: Literal[False] = ..., **kwargs: Any
825
-
) ->Then[_Condition]: ...
819
+
self, statement: str, *, str_as: Literal["value"] = ..., **kwargs: Any
820
+
) ->Then[_Conditions]: ...
826
821
@overload
827
822
defthen(
828
-
self, statement: str, *, str_as_lit: Literal[True], **kwargs: Any
829
-
) ->Then[_Conditions]: ...
823
+
self, statement: str, *, str_as: Literal["shorthand"], **kwargs: Any
824
+
) ->Then[_Condition]: ...
830
825
@overload
831
826
defthen(
832
827
self,
@@ -841,7 +836,7 @@ def then(
841
836
self,
842
837
statement: _StatementOrLiteralType,
843
838
*,
844
-
str_as_lit: bool=False,
839
+
str_as: _StrAsType="value",
845
840
**kwargs: Any,
846
841
) ->Then[Any]:
847
842
"""Attach a statement to this predicate.
@@ -850,17 +845,20 @@ def then(
850
845
----------
851
846
statement
852
847
A spec or value to use when the preceding :func:`.when()` clause is true.
853
-
str_as_lit
854
-
Wrap ``str`` in :func:`.value()` instead of encoding as `shorthand<https://altair-viz.github.io/user_guide/encodings/index.html#encoding-shorthands>`__.
848
+
str_as
849
+
Wrap strings in :func:`.value()` or encode as `shorthand<https://altair-viz.github.io/user_guide/encodings/index.html#encoding-shorthands>`__.
850
+
851
+
.. note::
852
+
``str_as="shorthand"`` is the behavior used in :func:`.condition()`.
855
853
**kwargs
856
854
Additional keyword args are added to the resulting ``dict``.
self, statement: _TSchemaBase, *, str_as_lit: bool= ..., **kwargs: Any
890
+
self, statement: _TSchemaBase, *, str_as: _StrAsType= ..., **kwargs: Any
893
891
) ->_TSchemaBase: ...
894
892
@overload
895
893
defotherwise(
@@ -902,14 +900,14 @@ def otherwise(
902
900
self,
903
901
statement: Map|_OneOrSeqLiteralValue,
904
902
*,
905
-
str_as_lit: bool= ...,
903
+
str_as: _StrAsType= ...,
906
904
**kwargs: Any,
907
905
) ->_Conditional[Any]: ...
908
906
defotherwise(
909
907
self,
910
908
statement: _StatementOrLiteralType,
911
909
*,
912
-
str_as_lit: bool=False,
910
+
str_as: _StrAsType="value",
913
911
**kwargs: Any,
914
912
) ->SchemaBase|_Conditional[Any]:
915
913
"""Finalize the condition with a default value.
@@ -921,13 +919,16 @@ def otherwise(
921
919
922
920
.. note::
923
921
Roughly equivalent to an ``else`` clause.
924
-
str_as_lit
925
-
Wrap ``str`` in :func:`.value()` instead of encoding as `shorthand<https://altair-viz.github.io/user_guide/encodings/index.html#encoding-shorthands>`__.
922
+
str_as
923
+
Wrap strings in :func:`.value()` or encode as `shorthand<https://altair-viz.github.io/user_guide/encodings/index.html#encoding-shorthands>`__.
924
+
925
+
.. note::
926
+
``str_as="shorthand"`` is the behavior used in :func:`.condition()`.
926
927
**kwargs
927
928
Additional keyword args are added to the resulting ``dict``.
A spec or value to use when the preceding :meth:`Then.when()` clause is true.
1052
-
str_as_lit
1053
-
Wrap ``str`` in :func:`.value()` instead of encoding as `shorthand<https://altair-viz.github.io/user_guide/encodings/index.html#encoding-shorthands>`__.
1053
+
str_as
1054
+
Wrap strings in :func:`.value()` or encode as `shorthand<https://altair-viz.github.io/user_guide/encodings/index.html#encoding-shorthands>`__.
1055
+
1056
+
.. note::
1057
+
``str_as="shorthand"`` is the behavior used in :func:`.condition()`.
1054
1058
**kwargs
1055
1059
Additional keyword args are added to the resulting ``dict``.
0 commit comments