Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions TPTBox/core/nii_poi_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ def assert_affine(

# Print errors
for err in found_errors:
text = f"{text}; {err}" if text else f"{err}"
log.print(f"{text}", ltype=Log_Type.FAIL, verbose=verbose)
text2 = f"{text}; {err}" if text else f"{err}"
log.print(f"{text2}", ltype=Log_Type.FAIL, verbose=verbose)
Comment on lines +308 to +309
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

text2 is a non-descriptive name for the constructed log message; consider renaming to something like msg/log_msg to make intent clear and avoid confusion with the text parameter used later in the AssertionError.

Suggested change
text2 = f"{text}; {err}" if text else f"{err}"
log.print(f"{text2}", ltype=Log_Type.FAIL, verbose=verbose)
log_msg = f"{text}; {err}" if text else f"{err}"
log.print(log_msg, ltype=Log_Type.FAIL, verbose=verbose)

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log.print(f"{text2}", ...) wraps an existing string in an f-string without interpolation; pass text2 directly to avoid redundant formatting.

Suggested change
log.print(f"{text2}", ltype=Log_Type.FAIL, verbose=verbose)
log.print(text2, ltype=Log_Type.FAIL, verbose=verbose)

Copilot uses AI. Check for mistakes.
# Final conclusion and possible raising of AssertionError
has_errors = len(found_errors) > 0
if raise_error and has_errors:
Expand Down
Loading