Lazy keyword added to colorizer and test in PR-#142351.
Tested NameError hint expanded in PR-#144299.
]) +
r"))"
)
- lazy_softkw = (
+ lazy_softkw = ( # lazy new in 3.15 (+ 2 lines below).
r"^[ \t]*" + # at beginning of line + possible indentation
r"(?P<LAZY_SOFTKW>lazy)" +
r"(?=[ \t]+(?:import|from)\b)" # followed by 'import' or 'from'
self._assert_highlighting('case _:', {'KEYWORD': [('1.0', '1.4'),
('1.5', '1.6')]})
- def test_lazy_soft_keyword(self):
+ def test_lazy_soft_keyword(self): # lazy new in 3.15.
# lazy followed by import
self._assert_highlighting('lazy import foo',
{'KEYWORD': [('1.0', '1.4'),
"Or did you forget to import 'abc'?\n"),
('int.reel', AttributeError,
"type object 'int' has no attribute 'reel'. "
- "Did you mean '.real' instead of '.reel'?\n"),
+ "Did you mean '.real' instead of '.reel'?\n"), # More in 3.15.
)
@force_not_colorized