Skip to content

Commit

Permalink
remove a debug assertion that no longer passes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood committed Mar 14, 2024
1 parent 1bf62d1 commit 1eed840
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions crates/ruff_python_formatter/src/expression/expr_name.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use ruff_formatter::{write, FormatContext};
use ruff_formatter::write;
use ruff_python_ast::AnyNodeRef;
use ruff_python_ast::ExprName;

Expand All @@ -11,16 +11,11 @@ pub struct FormatExprName;

impl FormatNodeRule<ExprName> for FormatExprName {
fn fmt_fields(&self, item: &ExprName, f: &mut PyFormatter) -> FormatResult<()> {
let ExprName { id, range, ctx: _ } = item;

debug_assert_eq!(
id.as_str(),
f.context()
.source_code()
.slice(*range)
.text(f.context().source_code())
);

let ExprName {
id: _,
range,
ctx: _,
} = item;
write!(f, [source_text_slice(*range)])
}

Expand Down

0 comments on commit 1eed840

Please sign in to comment.