Suggestions for new keywords added in 3.10 appear in older versions #1724
Labels
enhancement
New feature or request
fixed in next version (main)
A fix has been implemented and will appear in an upcoming version
Describe the bug
The
match
andcase
soft keywords added with the Structural Pattern Matching PEP 634 seem to be given as suggestions when typing an identifier, even if the current activated Python Environment doesn't accept the keyword. But, Pyright correctly complains that match statements require 3.10 or newer when writing a match statement.To Reproduce
match
orcase
Expected behavior
Ideally, I don't think it should suggest keywords that aren't available on versions the Python Environment is using.
Screenshots or Code


VS Code extension or command-line
VS Code - Pylance: v2021.8.2 (Python 3.9.6)
The text was updated successfully, but these errors were encountered: