Fix ExceptionGroup F821 false positive
This commit is contained in:
4
crates/ruff/resources/test/fixtures/pyflakes/F821_10.py
vendored
Normal file
4
crates/ruff/resources/test/fixtures/pyflakes/F821_10.py
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
try:
|
||||
pass
|
||||
except ExceptionGroup:
|
||||
pass
|
||||
@@ -102,6 +102,7 @@ mod tests {
|
||||
#[test_case(Rule::UndefinedName, Path::new("F821_7.py"); "F821_7")]
|
||||
#[test_case(Rule::UndefinedName, Path::new("F821_8.pyi"); "F821_8")]
|
||||
#[test_case(Rule::UndefinedName, Path::new("F821_9.py"); "F821_9")]
|
||||
#[test_case(Rule::UndefinedName, Path::new("F821_10.py"); "F821_10")]
|
||||
#[test_case(Rule::UndefinedExport, Path::new("F822_0.py"); "F822_0")]
|
||||
#[test_case(Rule::UndefinedExport, Path::new("F822_1.py"); "F822_1")]
|
||||
#[test_case(Rule::UndefinedExport, Path::new("F822_2.py"); "F822_2")]
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
source: crates/ruff/src/rules/pyflakes/mod.rs
|
||||
expression: diagnostics
|
||||
---
|
||||
[]
|
||||
|
||||
@@ -17,6 +17,7 @@ pub const BUILTINS: &[&str] = &[
|
||||
"Ellipsis",
|
||||
"EnvironmentError",
|
||||
"Exception",
|
||||
"ExceptionGroup",
|
||||
"False",
|
||||
"FileExistsError",
|
||||
"FileNotFoundError",
|
||||
|
||||
Reference in New Issue
Block a user