Skip to content

Commit

Permalink
Use proper dict type definitions
Browse files Browse the repository at this point in the history
Support for Python 3.7 dropped, so these work now.
  • Loading branch information
teroyks committed Sep 26, 2023
1 parent b7d8766 commit ce1d35c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions valohai_yaml/objs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def check_type_and_listify(

def check_type_and_dictify(source: Optional[Iterable[Any]], type: Type[T], attr: str) -> OrderedDictType[str, T]:
"""Check that all items in the `source` iterable are of the type `type` and map them into an OrderedDict."""
out = OrderedDict() # type: OrderedDict[str, T]
out: OrderedDict[str, T] = OrderedDict()
if source is None:
return out

Expand All @@ -53,7 +53,7 @@ def check_type_and_dictify(source: Optional[Iterable[Any]], type: Type[T], attr:


def serialize_into(
dest, # type: OrderedDict[str, Any] # noqa: ANN001
dest: OrderedDict[str, Any],
key: str,
value: Any,
*,
Expand Down

0 comments on commit ce1d35c

Please sign in to comment.