mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-23 03:44:31 +00:00
Replace Formatter<PyFormatContext<'_>>
with PyFormatter
(#6330)
This is a refactoring to use the type alias in more places. In the process, I had to fix and run generate.py. There are no functional changes.
This commit is contained in:
parent
8a5bc93fdd
commit
a48d16e025
23 changed files with 212 additions and 424 deletions
|
@ -31,6 +31,7 @@ pub(crate) mod expr_generator_exp;
|
|||
pub(crate) mod expr_if_exp;
|
||||
pub(crate) mod expr_joined_str;
|
||||
pub(crate) mod expr_lambda;
|
||||
pub(crate) mod expr_line_magic;
|
||||
pub(crate) mod expr_list;
|
||||
pub(crate) mod expr_list_comp;
|
||||
pub(crate) mod expr_name;
|
||||
|
@ -147,7 +148,7 @@ pub(crate) struct MaybeParenthesizeExpression<'a> {
|
|||
}
|
||||
|
||||
impl Format<PyFormatContext<'_>> for MaybeParenthesizeExpression<'_> {
|
||||
fn fmt(&self, f: &mut Formatter<PyFormatContext<'_>>) -> FormatResult<()> {
|
||||
fn fmt(&self, f: &mut PyFormatter) -> FormatResult<()> {
|
||||
let MaybeParenthesizeExpression {
|
||||
expression,
|
||||
parent,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue