From 9ef252a3bb3afeb508a1af9136891c98b3c4a11a Mon Sep 17 00:00:00 2001 From: Stefan Marr Date: Fri, 1 Mar 2024 10:32:12 +0000 Subject: [PATCH] =?UTF-8?q?Use=20max()=20instead=20of=20check,=20pylint=20?= =?UTF-8?q?wants=20this=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Marr --- src/som/compiler/bc/method_generation_context.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/som/compiler/bc/method_generation_context.py b/src/som/compiler/bc/method_generation_context.py index 4114d76c..06f1af4b 100644 --- a/src/som/compiler/bc/method_generation_context.py +++ b/src/som/compiler/bc/method_generation_context.py @@ -276,8 +276,7 @@ def get_max_context_level(self): def add_bytecode(self, bytecode, stack_effect): self._current_stack_depth += stack_effect - if self._current_stack_depth > self.max_stack_depth: - self.max_stack_depth = self._current_stack_depth + self.max_stack_depth = max(self.max_stack_depth, self._current_stack_depth) self._bytecode.append(bytecode) self._last_4_bytecodes[0] = self._last_4_bytecodes[1]