1
0
forked from VimPlug/jedi

Fix two bugs that were raising exceptions

This commit is contained in:
Dave Halter
2018-08-27 23:37:20 +02:00
parent e74d4fe9b7
commit 921ab6e391
2 changed files with 3 additions and 2 deletions

View File

@@ -133,7 +133,8 @@ class TypingContextWithIndex(_WithIndexBase):
elif string_name == 'Optional':
# Optional is basically just saying it's either None or the actual
# type.
return ContextSet(self._context) \
# TODO raise a warning if multiple params are given
return self._execute_annotations_for_all_indexes() \
| ContextSet(builtin_from_name(self.evaluator, u'None'))
elif string_name == 'Type':
# The type is actually already given in the index_context