Skip to content

Commit

Permalink
fix: Update typing checks to include Python3.6 deprecated types. (#6520)
Browse files Browse the repository at this point in the history
  • Loading branch information
sasha-gitg authored Sep 8, 2021
1 parent 9ed77f5 commit b6cb0b4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import collections
import inspect
import json
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
import tempfile
import docstring_parser

Expand Down Expand Up @@ -136,7 +136,7 @@ def is_serializable_to_json(annotation: Any) -> bool:
Returns:
True if serializable to json.
"""
serializable_types = (dict, list, collections.abc.Sequence)
serializable_types = (dict, list, collections.abc.Sequence, Dict, Sequence)
return getattr(annotation, '__origin__', None) in serializable_types


Expand Down

0 comments on commit b6cb0b4

Please sign in to comment.