Fix missing inference for typing.Type[typing.TypeVar] (#1448)

* Add Type[TypeVar] support
* Completion tests for typing.Type[typing.TypeVar]
This commit is contained in:
Samuel Roeca
2019-11-27 22:10:58 +01:00
committed by Dave Halter
parent facd21afc6
commit 761f0828c7
3 changed files with 47 additions and 5 deletions
+4 -1
View File
@@ -219,7 +219,10 @@ class _TypingClassMixin(ClassMixin):
class TypingClassValueWithIndex(_TypingClassMixin, TypingValueWithIndex):
pass
@inference_state_method_cache()
def get_generics(self):
return list(_iter_over_arguments(self._index_value, self._context_of_index))
class TypingClassValue(_TypingClassMixin, TypingValue):