mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-16 01:25:11 +00:00
Fix F811 false positive with match (#4161)
This commit is contained in:
parent
a32617911a
commit
8c97e7922b
4 changed files with 22 additions and 0 deletions
|
@ -71,6 +71,10 @@ fn alternatives(stmt: RefEquality<Stmt>) -> Vec<Vec<RefEquality<Stmt>>> {
|
|||
body.iter().map(RefEquality).collect()
|
||||
}))
|
||||
.collect(),
|
||||
StmtKind::Match { cases, .. } => cases
|
||||
.iter()
|
||||
.map(|case| case.body.iter().map(RefEquality).collect())
|
||||
.collect(),
|
||||
_ => vec![],
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue