Skip to content

Commit 7eb476d

Browse files
[3.15] Add "new in 3.15" comments to idlelib (GH-153052) (#153054)
Add "new in 3.15" comments to idlelib (GH-153052) Lazy keyword added to colorizer and test in PR-GH-142351. Tested NameError hint expanded in PR-GH-144299. (cherry picked from commit 0621639) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
1 parent 41a2abe commit 7eb476d

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/idlelib/colorizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def make_pat():
4242
]) +
4343
r"))"
4444
)
45-
lazy_softkw = (
45+
lazy_softkw = ( # lazy new in 3.15 (+ 2 lines below).
4646
r"^[ \t]*" + # at beginning of line + possible indentation
4747
r"(?P<LAZY_SOFTKW>lazy)" +
4848
r"(?=[ \t]+(?:import|from)\b)" # followed by 'import' or 'from'

Lib/idlelib/idle_test/test_colorizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ def test_case_soft_keyword(self):
542542
self._assert_highlighting('case _:', {'KEYWORD': [('1.0', '1.4'),
543543
('1.5', '1.6')]})
544544

545-
def test_lazy_soft_keyword(self):
545+
def test_lazy_soft_keyword(self): # lazy new in 3.15.
546546
# lazy followed by import
547547
self._assert_highlighting('lazy import foo',
548548
{'KEYWORD': [('1.0', '1.4'),

Lib/idlelib/idle_test/test_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __eq__(self, other):
4444
"Or did you forget to import 'abc'?\n"),
4545
('int.reel', AttributeError,
4646
"type object 'int' has no attribute 'reel'. "
47-
"Did you mean '.real' instead of '.reel'?\n"),
47+
"Did you mean '.real' instead of '.reel'?\n"), # More in 3.15.
4848
)
4949

5050
@force_not_colorized

0 commit comments

Comments
 (0)