Skip to content

Commit

Permalink
Refactor crates/ruff_python_stdlib/src/builtins.rs to make it easie…
Browse files Browse the repository at this point in the history
…r to add support for new Python versions (#14632)
  • Loading branch information
AlexWaygood authored Nov 27, 2024
1 parent 4fb1416 commit ef0e2a6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/ruff_python_stdlib/src/builtins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,9 @@ pub fn is_python_builtin(name: &str, minor_version: u8, is_notebook: bool) -> bo
| "type"
| "vars"
| "zip"
) | (10..=13, "EncodingWarning" | "aiter" | "anext")
| (11..=13, "BaseExceptionGroup" | "ExceptionGroup")
| (13, "PythonFinalizationError")
) | (10.., "EncodingWarning" | "aiter" | "anext")
| (11.., "BaseExceptionGroup" | "ExceptionGroup")
| (13.., "PythonFinalizationError")
)
}

Expand Down Expand Up @@ -489,8 +489,8 @@ pub fn is_exception(name: &str, minor_version: u8) -> bool {
| "SyntaxWarning"
| "UnicodeWarning"
| "UserWarning"
) | (10..=13, "EncodingWarning")
| (11..=13, "BaseExceptionGroup" | "ExceptionGroup")
| (13, "PythonFinalizationError")
) | (10.., "EncodingWarning")
| (11.., "BaseExceptionGroup" | "ExceptionGroup")
| (13.., "PythonFinalizationError")
)
}

0 comments on commit ef0e2a6

Please sign in to comment.