mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-31 15:47:41 +00:00
Checker: Remove unnecessary unreachable (#7181)
This commit is contained in:
parent
5f59101811
commit
31990b8d3f
1 changed files with 1 additions and 5 deletions
|
@ -528,11 +528,7 @@ where
|
|||
&self.semantic.definitions,
|
||||
);
|
||||
self.semantic.push_definition(definition);
|
||||
|
||||
self.semantic.push_scope(match &stmt {
|
||||
Stmt::FunctionDef(stmt) => ScopeKind::Function(stmt),
|
||||
_ => unreachable!("Expected Stmt::FunctionDef"),
|
||||
});
|
||||
self.semantic.push_scope(ScopeKind::Function(function_def));
|
||||
|
||||
self.deferred.functions.push(self.semantic.snapshot());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue