1
0
forked from VimPlug/jedi

Refactor execute_operation a bit

This commit is contained in:
Dave Halter
2020-01-12 13:01:08 +01:00
parent bd2ed8dbbd
commit 11a12d6ca8
7 changed files with 36 additions and 17 deletions

View File

@@ -262,10 +262,13 @@ class CompiledObject(Value):
return default
def execute_operation(self, other, operator):
return create_from_access_path(
self.inference_state,
self.access_handle.execute_operation(other.access_handle, operator)
)
try:
return ValueSet([create_from_access_path(
self.inference_state,
self.access_handle.execute_operation(other.access_handle, operator)
)])
except TypeError:
return NO_VALUES
def execute_annotation(self):
if self.access_handle.get_repr() == 'None':