Skip to content

Commit

Permalink
Fixed test failures on py3.5.2, py3.7 and py3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Nov 27, 2019
1 parent 373f4a6 commit 3be8f85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion typeguard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def check_sequence(argname: str, value, expected_type, memo: Optional[_CallMemo]


def check_set(argname: str, value, expected_type, memo: Optional[_CallMemo]) -> None:
if not isinstance(value, collections.abc.Set):
if not isinstance(value, (collections.abc.Set, AbstractSet)):
raise TypeError('type of {} must be a set; got {} instead'.
format(argname, qualified_name(value)))

Expand Down Expand Up @@ -503,6 +503,7 @@ def check_protocol(argname: str, value, expected_type):
List: check_list,
Sequence: check_sequence,
collections.abc.Sequence: check_sequence,
collections.abc.Set: check_set,
set: check_set,
Set: check_set,
tuple: check_tuple,
Expand Down

0 comments on commit 3be8f85

Please sign in to comment.