summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/pyparse.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-01-21 10:28:48 (GMT)
committerGitHub <noreply@github.com>2020-01-21 10:28:48 (GMT)
commitf3d3a3cc114ed30829544c3613b73e4fa6dd5599 (patch)
treee49779d5a753eeedf702de82e8eb20f3db4bbd70 /Lib/idlelib/pyparse.py
parentd7b0118a124f11f702bbe6e9f1bad680fb53590b (diff)
downloadcpython-f3d3a3cc114ed30829544c3613b73e4fa6dd5599.zip
cpython-f3d3a3cc114ed30829544c3613b73e4fa6dd5599.tar.gz
cpython-f3d3a3cc114ed30829544c3613b73e4fa6dd5599.tar.bz2
bpo-32989: IDLE - fix bad editor call of pyparse method (GH-5968)
Fix comments and add tests for editor newline_and_indent_event method. Remove unused None default for function parameter of pyparse find_good_parse_start method and code triggered by that default. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> (cherry picked from commit ec64640a2c5236d7a5d5470d759172a3d93eab0b) Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
Diffstat (limited to 'Lib/idlelib/pyparse.py')
-rw-r--r--Lib/idlelib/pyparse.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/idlelib/pyparse.py b/Lib/idlelib/pyparse.py
index feb57cb..9fa2010 100644
--- a/Lib/idlelib/pyparse.py
+++ b/Lib/idlelib/pyparse.py
@@ -133,8 +133,7 @@ class Parser:
self.code = s
self.study_level = 0
- def find_good_parse_start(self, is_char_in_string=None,
- _synchre=_synchre):
+ def find_good_parse_start(self, is_char_in_string, _synchre=_synchre):
"""
Return index of a good place to begin parsing, as close to the
end of the string as possible. This will be the start of some
@@ -149,10 +148,6 @@ class Parser:
"""
code, pos = self.code, None
- if not is_char_in_string:
- # no clue -- make the caller pass everything
- return None
-
# Peek back from the end for a good place to start,
# but don't try too often; pos will be left None, or
# bumped to a legitimate synch point.