diff options
author | Cheryl Sabella <cheryl.sabella@gmail.com> | 2020-01-21 10:11:26 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2020-01-21 10:11:26 (GMT) |
commit | ec64640a2c5236d7a5d5470d759172a3d93eab0b (patch) | |
tree | ad86cfb197213427cf1e00f8aee003980110629d /Lib/idlelib/pyparse.py | |
parent | 8698b34b68065b80bd9bd18b8decb425208fa386 (diff) | |
download | cpython-ec64640a2c5236d7a5d5470d759172a3d93eab0b.zip cpython-ec64640a2c5236d7a5d5470d759172a3d93eab0b.tar.gz cpython-ec64640a2c5236d7a5d5470d759172a3d93eab0b.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>
Diffstat (limited to 'Lib/idlelib/pyparse.py')
-rw-r--r-- | Lib/idlelib/pyparse.py | 7 |
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. |