refactor: Prune spinner animation frames and char assignments

This commit is contained in:
Paul Gauthier 2025-05-08 16:00:53 -07:00 committed by Paul Gauthier (aider)
parent 01592afac3
commit 0864a7ca76

View file

@ -278,18 +278,16 @@ class Spinner:
[-----#=]
[----#=-]
[---#=--]
[---#=--]
[---#=--]
[--#=---]
[-#=----]
""".strip().splitlines()
# If unicode is supported, swap the ASCII chars for nicer glyphs.
if self._supports_unicode():
scan_char, _, trail_char = "", "=", ""
scan_char, trail_char = "", ""
frames = [f.replace("#", scan_char).replace("-", trail_char) for f in ascii_frames]
else:
scan_char, _, _ = "#", "=", "-"
scan_char, _ = "#", "-"
frames = ascii_frames
# Bounce the scanner back and forth.