mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
Check LinterSettings::preview
for version-related syntax errors (#16429)
This commit is contained in:
parent
4a23756024
commit
3d72138740
3 changed files with 15 additions and 3 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue