mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-27 15:03:51 +00:00
Refactor crates/ruff_python_stdlib/src/builtins.rs
to make it easier to add support for new Python versions (#14632)
This commit is contained in:
parent
4fb1416bf4
commit
ef0e2a6e1b
1 changed files with 6 additions and 6 deletions
|
@ -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")
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -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")
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue