1
0
Fork 0

Merging upstream version 1.15.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-04-24 14:19:19 +02:00
parent deca1a8345
commit d312df1ef8
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
14 changed files with 42 additions and 36 deletions

View file

@ -30,7 +30,7 @@ logger = logging.getLogger(__name__)
class SkipAuthFileHistory(FileHistory):
"""Exactlly like FileHistory, but won't save `AUTH` command into history
"""Exactly like FileHistory, but won't save `AUTH` command into history
file."""
def append_string(self, string: str) -> None:
@ -142,19 +142,19 @@ class Rainbow:
def __init__(self):
self.current = -1
self.forword = 1
self.forward = 1
def __iter__(self):
return self
def __next__(self):
self.current += self.forword
self.current += self.forward
if 0 <= self.current < len(self.color):
# not to the end
return self.color[self.current]
else:
self.forword = -self.forword
self.current += 2 * self.forword
self.forward = -self.forward
self.current += 2 * self.forward
return self.color[self.current]