Very small refactoring

This commit is contained in:
Dave Halter
2019-05-27 23:57:23 +02:00
parent 1002acf907
commit 6f41530a03

View File

@@ -418,9 +418,7 @@ class TypeVar(_BaseTypingContext):
if self._bound_lazy_context is not None:
return self._bound_lazy_context.infer()
if self._constraints_lazy_contexts:
return ContextSet.from_sets(
l.infer() for l in self._constraints_lazy_contexts
)
return self.constraints
debug.warning('Tried to infer the TypeVar %s without a given type', self._var_name)
return NO_CONTEXTS