Skip to content

Commit 916d0d8

Browse files
authoredFeb 3, 2022
bpo-45975: IDLE - Remove extraneous parens (pythonGH-31107)
mistakenly included in 3 files in previous PR and backported both to 3.10 and 3.9.
1 parent 1aa6be0 commit 916d0d8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
 

‎Lib/idlelib/pyparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def find_good_parse_start(self, is_char_in_string):
179179
# Peeking back worked; look forward until _synchre no longer
180180
# matches.
181181
i = pos + 1
182-
while (m := _synchre(code, i)):
182+
while m := _synchre(code, i):
183183
s, i = m.span()
184184
if not is_char_in_string(s):
185185
pos = s

‎Lib/idlelib/replace.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ def replace_all(self, event=None):
158158
first = last = None
159159
# XXX ought to replace circular instead of top-to-bottom when wrapping
160160
text.undo_block_start()
161-
while (res := self.engine.search_forward(
162-
text, prog, line, col, wrap=False, ok=ok)):
161+
while res := self.engine.search_forward(
162+
text, prog, line, col, wrap=False, ok=ok):
163163
line, m = res
164164
chars = text.get("%d.0" % line, "%d.0" % (line+1))
165165
orig = m.group()

‎Lib/idlelib/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ def read(self, size=-1):
482482
result = self._line_buffer
483483
self._line_buffer = ''
484484
if size < 0:
485-
while (line := self.shell.readline()):
485+
while line := self.shell.readline():
486486
result += line
487487
else:
488488
while len(result) < size:

0 commit comments

Comments
 (0)
Please sign in to comment.