@@ -17,7 +17,7 @@ pub use pylint::PylintEmitter;
1717pub use rdjson:: RdjsonEmitter ;
1818use ruff_diagnostics:: { Diagnostic , DiagnosticKind , Fix } ;
1919use ruff_notebook:: NotebookIndex ;
20- use ruff_python_parser:: { ParseError , SyntaxError } ;
20+ use ruff_python_parser:: { ParseError , SyntaxError , SyntaxErrorKind } ;
2121use ruff_source_file:: { SourceFile , SourceLocation } ;
2222use ruff_text_size:: { Ranged , TextLen , TextRange , TextSize } ;
2323pub use sarif:: SarifEmitter ;
@@ -130,15 +130,15 @@ impl Message {
130130 noqa_offset : TextSize ,
131131 ) -> Message {
132132 match syntax_error. kind {
133- ruff_python_parser :: SyntaxErrorKind :: LateFutureImport => Message :: from_diagnostic (
133+ SyntaxErrorKind :: LateFutureImport => Message :: from_diagnostic (
134134 Diagnostic :: new (
135135 crate :: rules:: pyflakes:: rules:: LateFutureImport ,
136136 syntax_error. range ,
137137 ) ,
138138 file,
139139 noqa_offset,
140140 ) ,
141- _ => Message :: SyntaxError ( SyntaxErrorMessage {
141+ SyntaxErrorKind :: MatchBeforePy310 => Message :: SyntaxError ( SyntaxErrorMessage {
142142 message : format ! ( "SyntaxError: {}" , syntax_error. message( target_version) ) ,
143143 range : syntax_error. range ,
144144 file,
0 commit comments