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
![Screenshot 2021-08-25 at 14 46 23](https://user-images.githubusercontent.com/26068884/130802234-1eabc02c-36c8-47e8-a207-0813b152e2a4.png)
![Screenshot 2021-08-25 at 14 46 58](https://user-images.githubusercontent.com/26068884/130802324-4a15e71e-09f7-47d0-9317-384990ca43c8.png)
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: