Skip to content

Commit

Permalink
explicitly import format_args
Browse files Browse the repository at this point in the history
  • Loading branch information
davidszotten committed Jul 10, 2023
1 parent 8d11442 commit 9e7046b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crates/ruff_python_formatter/src/expression/expr_list_comp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::expression::parentheses::{
use crate::prelude::*;
use crate::AsFormat;
use crate::{FormatNodeRule, PyFormatter};
use ruff_formatter::{write, Buffer, FormatResult};
use ruff_formatter::{format_args, write, Buffer, FormatResult};
use rustpython_parser::ast::ExprListComp;

#[derive(Default)]
Expand All @@ -30,7 +30,7 @@ impl FormatNodeRule<ExprListComp> for FormatExprListComp {
f,
[parenthesized(
"[",
&self::format_args!(
&format_args!(
group(&elt.format()),
soft_line_break_or_space(),
group(&joined)
Expand Down
6 changes: 3 additions & 3 deletions crates/ruff_python_formatter/src/other/comprehension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::comments::{leading_comments, trailing_comments};
use crate::prelude::*;
use crate::AsFormat;
use crate::{FormatNodeRule, PyFormatter};
use ruff_formatter::{write, Buffer, FormatResult};
use ruff_formatter::{format_args, write, Buffer, FormatResult};
use rustpython_parser::ast::{Comprehension, Ranged};

#[derive(Default)]
Expand Down Expand Up @@ -37,7 +37,7 @@ impl FormatNodeRule<Comprehension> for FormatComprehension {
[
text("for"),
trailing_comments(before_target_comments),
group(&self::format_args!(
group(&format_args!(
soft_line_break_or_space(),
target.format(),
soft_line_break_or_space(),
Expand All @@ -60,7 +60,7 @@ impl FormatNodeRule<Comprehension> for FormatComprehension {
dangling_if_comments
.partition_point(|comment| comment.line_position().is_own_line()),
);
joiner.entry(&group(&self::format_args!(
joiner.entry(&group(&format_args!(
leading_comments(own_line_if_comments),
text("if"),
trailing_comments(end_of_line_if_comments),
Expand Down

0 comments on commit 9e7046b

Please sign in to comment.