Skip to content

Commit

Permalink
Use max() instead of check, pylint wants this…
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <[email protected]>
  • Loading branch information
smarr committed Mar 1, 2024
1 parent b6ffc7b commit 9ef252a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/som/compiler/bc/method_generation_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 9ef252a

Please sign in to comment.