Revert "style: Run linter"

This reverts commit 540b2519c2.
This commit is contained in:
Paul Gauthier 2025-05-08 15:38:19 -07:00
parent 98dc8e5d57
commit cf1d58745e

View file

@ -267,13 +267,13 @@ class Spinner:
self.scanner_dir = 1 if self.scanner_width > 1 else 0 # 1 → right, -1 → left self.scanner_dir = 1 if self.scanner_width > 1 else 0 # 1 → right, -1 → left
# Character palette will be upgraded to Unicode if possible # Character palette will be upgraded to Unicode if possible
self.scanner_head_char = "#" # One char per head position self.scanner_head_char = "#" # One char per head position
self.trail_active_char = "=" # Recently-visited positions self.trail_active_char = "=" # Recently-visited positions
self.trail_empty_char = "-" # Background self.trail_empty_char = "-" # Background
# Visual lengths (number of logical positions) # Visual lengths (number of logical positions)
self.scanner_head_length = 2 # "≡≡" self.scanner_head_length = 2 # "≡≡"
self.trail_active_length = 2 # "══" self.trail_active_length = 2 # "══"
# Upgrade to Unicode glyphs when the terminal supports them # Upgrade to Unicode glyphs when the terminal supports them
if self.is_tty: if self.is_tty:
@ -322,9 +322,9 @@ class Spinner:
# Add the active trail directly behind the head # Add the active trail directly behind the head
for i in range(1, self.trail_active_length + 1): for i in range(1, self.trail_active_length + 1):
if self.scanner_dir > 0: # moving right → trail to the left if self.scanner_dir > 0: # moving right → trail to the left
pos = head_start - i pos = head_start - i
else: # moving left → trail to the right else: # moving left → trail to the right
pos = head_end + i pos = head_end + i
if 0 <= pos < self.scanner_width and frame_chars[pos] == self.trail_empty_char: if 0 <= pos < self.scanner_width and frame_chars[pos] == self.trail_empty_char:
frame_chars[pos] = self.trail_active_char frame_chars[pos] = self.trail_active_char
@ -339,10 +339,7 @@ class Spinner:
# Advance for next frame # Advance for next frame
if self.scanner_width > self.scanner_head_length: if self.scanner_width > self.scanner_head_length:
self.scanner_pos += self.scanner_dir self.scanner_pos += self.scanner_dir
if ( if self.scanner_dir > 0 and self.scanner_pos >= self.scanner_width - self.scanner_head_length:
self.scanner_dir > 0
and self.scanner_pos >= self.scanner_width - self.scanner_head_length
):
self.scanner_pos = self.scanner_width - self.scanner_head_length self.scanner_pos = self.scanner_width - self.scanner_head_length
self.scanner_dir = -1 self.scanner_dir = -1
elif self.scanner_dir < 0 and self.scanner_pos <= 0: elif self.scanner_dir < 0 and self.scanner_pos <= 0: