Check LinterSettings::preview for version-related syntax errors (#16429)

This commit is contained in:
Brent Westbrook 2025-02-28 03:58:22 -05:00 committed by GitHub
parent 4a23756024
commit 3d72138740
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 15 additions and 3 deletions

View file

@ -65,7 +65,7 @@ fn syntax_error() {
fn unsupported_syntax_error() {
check!(
"match 2:\n case 1: ...",
r#"{}"#,
r#"{"preview": true}"#,
[ExpandedMessage {
code: None,
message: "SyntaxError: Cannot use `match` statement on Python 3.9 (syntax was added in Python 3.10)".to_string(),