1
0
forked from VimPlug/jedi

Upgrade typeshed to the latest commits

Also fixes some small Jedi issues with it (None interpretation in annoations mostly)
This commit is contained in:
Dave Halter
2019-12-02 10:14:59 +01:00
parent 74de9e7d53
commit 7254bec92c
6 changed files with 14 additions and 8 deletions

View File

@@ -264,6 +264,12 @@ class CompiledObject(Value):
self.access_handle.execute_operation(other.access_handle, operator)
)
def execute_annotation(self):
if self.access_handle.get_repr() == 'None':
# None as an annotation doesn't need to be executed.
return ValueSet([self])
return super().execute_annotation()
def negate(self):
return create_from_access_path(self.inference_state, self.access_handle.negate())