Skip to content

Commit 3218a05

Browse files
dmcppcheckclaude
andcommitted
donate-cpu: fix pylint warning consider-using-max-builtin
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent afe2378 commit 3218a05

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎tools/donate_cpu_lib.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,9 +570,7 @@ def scan_package(cppcheck_path, source_path, libraries, capture_callstack=True,
570570
stacktrace = st_stdout[gdb_pos:]
571571
else:
572572
# put the assertion failure messages before the ' received signal ' line, the servers parse the stack trace after that line
573-
signal_line_pos = st_stdout.rfind('\n', 0, gdb_pos) + 1
574-
if signal_line_pos < last_check_pos:
575-
signal_line_pos = last_check_pos
573+
signal_line_pos = max(st_stdout.rfind('\n', 0, gdb_pos) + 1, last_check_pos)
576574
stacktrace = st_stdout[last_check_pos:signal_line_pos] + \
577575
''.join(msg + '\n' for msg in assertion_failures) + \
578576
st_stdout[signal_line_pos:]

0 commit comments

Comments
 (0)