Errors reported by mypy 0.641 #558

This commit is contained in:
theJosher
2018-10-28 22:58:56 -04:00
committed by Dan Gohman
parent f1db50aa76
commit d2b3ff6183

View File

@@ -26,6 +26,14 @@ class TypeConstraint(object):
"""
Base class for all runtime-emittable type constraints.
"""
def __init__(self, tv, tc):
# type: (TypeVar, Union[TypeVar, TypeSet]) -> None
"""
Abstract "constructor" for linters
"""
assert False, "Abstract"
def translate(self, m):
# type: (Union[TypeEnv, TypeMap]) -> TypeConstraint
"""
@@ -75,7 +83,7 @@ class TypeConstraint(object):
"""
Return the typevars contained in this constraint.
"""
return filter(lambda x: isinstance(x, TypeVar), self._args())
return list(filter(lambda x: isinstance(x, TypeVar), self._args()))
def is_trivial(self):
# type: () -> bool