Errors reported by mypy 0.641 #558
This commit is contained in:
@@ -26,6 +26,14 @@ class TypeConstraint(object):
|
|||||||
"""
|
"""
|
||||||
Base class for all runtime-emittable type constraints.
|
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):
|
def translate(self, m):
|
||||||
# type: (Union[TypeEnv, TypeMap]) -> TypeConstraint
|
# type: (Union[TypeEnv, TypeMap]) -> TypeConstraint
|
||||||
"""
|
"""
|
||||||
@@ -75,7 +83,7 @@ class TypeConstraint(object):
|
|||||||
"""
|
"""
|
||||||
Return the typevars contained in this constraint.
|
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):
|
def is_trivial(self):
|
||||||
# type: () -> bool
|
# type: () -> bool
|
||||||
|
|||||||
Reference in New Issue
Block a user