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

@@ -309,7 +309,7 @@ class ACSetup:
def wait_one_configured(self, account):
"""wait until this account has successfully configured."""
if self._account2state[account] == self.CONFIGURING:
while 1:
while True:
acc = self._pop_config_success()
if acc == account:
break
@@ -638,7 +638,7 @@ class BotProcess:
def _run_stdout_thread(self) -> None:
try:
while 1:
while True:
line = self.popen.stdout.readline()
if not line:
break
@@ -659,7 +659,7 @@ class BotProcess:
for next_pattern in patterns:
print("+++FNMATCH:", next_pattern)
ignored = []
while 1:
while True:
line = self.stdout_queue.get()
if line is None:
if ignored: