Skip to content

Commit

Permalink
Fix type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
binste committed Aug 29, 2023
1 parent 9469f58 commit 9a41f9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions altair/vegalite/v5/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from toolz.curried import pipe as _pipe
import itertools
import sys
from typing import cast, List, Optional, Any, Iterable, Union, Literal, Dict
from typing import cast, List, Optional, Any, Iterable, Union, Literal

# Have to rename it here as else it overlaps with schema.core.Type
from typing import Type as TypingType
Expand Down Expand Up @@ -219,7 +219,7 @@ def ref(self) -> dict:
"'ref' is deprecated. No need to call '.ref()' anymore."
return self.to_dict()

def to_dict(self) -> Dict[str, Union[str, dict]]:
def to_dict(self) -> TypingDict[str, Union[str, dict]]:
if self.param_type == "variable":
return {"expr": self.name}
elif self.param_type == "selection":
Expand Down Expand Up @@ -1744,7 +1744,7 @@ def transform_filter(self, filter, **kwargs) -> Self:
"""
if isinstance(filter, Parameter):
new_filter = {"param": filter.name}
new_filter: TypingDict[str, Union[bool, str]] = {"param": filter.name}
if "empty" in kwargs:
new_filter["empty"] = kwargs.pop("empty")
elif isinstance(filter.empty, bool):
Expand Down

0 comments on commit 9a41f9a

Please sign in to comment.