Refactor execute_operation a bit

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

No files matched your search

+7 -4
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':