Skip to content

Commit

Permalink
Fix bug in BaseRepr.whitespace_remove() walrus expression
Browse files Browse the repository at this point in the history
  • Loading branch information
sglvladi committed Aug 15, 2023
1 parent 8c4fcf2 commit b7ae19a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stonesoup/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def whitespace_remove(cls, maxlen_whitespace, val):
"""Remove excess whitespace, replacing with ellipses"""
large_whitespace = ' ' * (maxlen_whitespace+1)
fixed_whitespace = ' ' * maxlen_whitespace
while excess := val.find(large_whitespace) != -1: # Find the excess whitespace, if any
while (excess := val.find(large_whitespace)) != -1: # Find the excess whitespace, if any
line_end = ''.join(val[excess:].partition('\n')[1:])
val = ''.join([val[0:excess], fixed_whitespace, '...', line_end])
return val
Expand Down

0 comments on commit b7ae19a

Please sign in to comment.