Skip to content

Commit c3a5009

Browse files
committed
Oops
1 parent cab8b61 commit c3a5009

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

unpythonic/typecheck.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,9 @@ def iscollection(statictype, runtimetype):
303303
typeargs = (int,)
304304
else:
305305
typeargs = T.__args__
306+
# Python 3.6: consistent behavior with 3.7+, which use an unconstrained TypeVar T.
306307
if typeargs is None:
307-
raise TypeError("Missing mandatory element type argument of `{}`".format(statictype))
308+
typeargs = (typing.TypeVar("T"))
308309
# Judging by the docs, List takes one type argument. The rest are similar.
309310
# https://docs.python.org/3/library/typing.html#typing.List
310311
assert len(typeargs) == 1

0 commit comments

Comments
 (0)