python: replace "while 1" with "while True"

This makes pyright recognize that the function never returns implicitly.
This commit is contained in:
link2xt
2023-02-18 11:31:07 +00:00
parent 7586bcf45e
commit 48fee4fc92
4 changed files with 14 additions and 14 deletions

View File

@@ -207,14 +207,14 @@ class IdleManager:
return res
def wait_for_new_message(self, timeout=None) -> bytes:
while 1:
while True:
for item in self.check(timeout=timeout):
if b"EXISTS" in item or b"RECENT" in item:
return item
def wait_for_seen(self, timeout=None) -> int:
"""Return first message with SEEN flag from a running idle-stream."""
while 1:
while True:
for item in self.check(timeout=timeout):
if FETCH in item:
self.log(str(item))