From dfe0e657f586082be3768e4b4a0fc16a7da250da Mon Sep 17 00:00:00 2001 From: Josselin Date: Sun, 12 Jul 2020 10:46:56 +0200 Subject: [PATCH] Node.son_true/son_false: minor --- slither/core/cfg/node.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slither/core/cfg/node.py b/slither/core/cfg/node.py index 094b78dc8..f8dbe87ce 100644 --- a/slither/core/cfg/node.py +++ b/slither/core/cfg/node.py @@ -650,13 +650,13 @@ class Node(SourceMapping, ChildFunction): @property def son_true(self) -> Optional["Node"]: - if self.type == NodeType.IF or self.type == NodeType.IFLOOP: + if self.type in [NodeType.IF, NodeType.IFLOOP]: return self._sons[0] return None @property def son_false(self) -> Optional["Node"]: - if (self.type == NodeType.IF or self.type == NodeType.IFLOOP) and len(self._sons) >= 1: + if self.type in [NodeType.IF, NodeType.IFLOOP] and len(self._sons) >= 1: return self._sons[1] return None