mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 12:29:28 +00:00
Remove Stmt::TryStar
(#6566)
## Summary Instead, we set an `is_star` flag on `Stmt::Try`. This is similar to the pattern we've migrated towards for `Stmt::For` (removing `Stmt::AsyncFor`) and friends. While these are significant differences for an interpreter, we tend to handle these cases identically or nearly identically. ## Test Plan `cargo test`
This commit is contained in:
parent
09c8b17661
commit
96d310fbab
33 changed files with 70 additions and 489 deletions
|
@ -24,7 +24,6 @@ pub(crate) mod stmt_pass;
|
|||
pub(crate) mod stmt_raise;
|
||||
pub(crate) mod stmt_return;
|
||||
pub(crate) mod stmt_try;
|
||||
pub(crate) mod stmt_try_star;
|
||||
pub(crate) mod stmt_type_alias;
|
||||
pub(crate) mod stmt_while;
|
||||
pub(crate) mod stmt_with;
|
||||
|
@ -50,7 +49,6 @@ impl FormatRule<Stmt, PyFormatContext<'_>> for FormatStmt {
|
|||
Stmt::Match(x) => x.format().fmt(f),
|
||||
Stmt::Raise(x) => x.format().fmt(f),
|
||||
Stmt::Try(x) => x.format().fmt(f),
|
||||
Stmt::TryStar(x) => x.format().fmt(f),
|
||||
Stmt::Assert(x) => x.format().fmt(f),
|
||||
Stmt::Import(x) => x.format().fmt(f),
|
||||
Stmt::ImportFrom(x) => x.format().fmt(f),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue