Skip to content

[3.9] bpo-45975: IDLE - Remove extraneous parens (GH-31107) #31110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/idlelib/pyparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def find_good_parse_start(self, is_char_in_string):
# 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
Expand Down
4 changes: 2 additions & 2 deletions Lib/idlelib/replace.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ def replace_all(self, event=None):
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()
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ def read(self, size=-1):
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:
Expand Down