Skip to content

Commit

Permalink
fix(typing): ignore[index] from vega#3455
Browse files Browse the repository at this point in the history
  • Loading branch information
dangotbanned committed Jul 16, 2024
1 parent 426336c commit 32e4fc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions altair/vegalite/v5/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,12 +465,12 @@ def param(
empty_remap = {"none": False, "all": True}
parameter = Parameter(name)

if empty is not Undefined:
if not _is_undefined(empty):
if isinstance(empty, bool) and not isinstance(empty, str):
parameter.empty = empty
elif empty in empty_remap:
utils.deprecated_warn(warn_msg, version="5.0.0")
parameter.empty = empty_remap[empty] # type: ignore[index]
parameter.empty = empty_remap[typing.cast(str, empty)]
else:
raise ValueError(warn_msg)

Expand Down

0 comments on commit 32e4fc3

Please sign in to comment.