diff --git a/jedi/inference/gradual/typing.py b/jedi/inference/gradual/typing.py index cfdce3ea..3b3cdf17 100644 --- a/jedi/inference/gradual/typing.py +++ b/jedi/inference/gradual/typing.py @@ -142,7 +142,6 @@ class TypingValueWithIndex(BaseTypingValueWithGenerics): class ProxyTypingValue(BaseTypingValue): index_class = TypingValueWithIndex - py__simple_getitem__ = None def with_generics(self, generics_tuple): return self.index_class.create_cached( diff --git a/test/completion/pep0484_typing.py b/test/completion/pep0484_typing.py index 32d00932..9104ca11 100644 --- a/test/completion/pep0484_typing.py +++ b/test/completion/pep0484_typing.py @@ -332,6 +332,9 @@ def union4(x: U[int, str]): #? int() str() x +#? typing.Optional +typing.Optional[0] + # ------------------------- # Type Vars # -------------------------