bpo-45975: IDLE - Remove extraneous parens (GH-31107)

mistakenly included in 3 files in previous PR
and backported both to 3.10 and 3.9.
(cherry picked from commit 916d0d822c)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
Miss Islington (bot) 2022-02-03 12:44:11 -08:00 committed by GitHub
parent ff6948b128
commit 63523e7b2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -179,7 +179,7 @@ class Parser:
# Peeking back worked; look forward until _synchre no longer
# matches.
i = pos + 1
while (m := _synchre(code, i)):
while m := _synchre(code, i):
s, i = m.span()
if not is_char_in_string(s):
pos = s

View file

@ -158,8 +158,8 @@ class ReplaceDialog(SearchDialogBase):
first = last = None
# XXX ought to replace circular instead of top-to-bottom when wrapping
text.undo_block_start()
while (res := self.engine.search_forward(
text, prog, line, col, wrap=False, ok=ok)):
while res := self.engine.search_forward(
text, prog, line, col, wrap=False, ok=ok):
line, m = res
chars = text.get("%d.0" % line, "%d.0" % (line+1))
orig = m.group()

View file

@ -482,7 +482,7 @@ class StdInputFile(StdioFile):
result = self._line_buffer
self._line_buffer = ''
if size < 0:
while (line := self.shell.readline()):
while line := self.shell.readline():
result += line
else:
while len(result) < size: