Skip to content

Commit

Permalink
Revert "Simplify arithmetic operation in logical lines checker (#11346)…
Browse files Browse the repository at this point in the history
…" (#11348)

## Summary

I merged this, but I think it might not be the same behavior? See my
comment at:
#11346 (comment)
  • Loading branch information
charliermarsh authored and dhruvmanila committed May 17, 2024
1 parent 3cfbcf4 commit ef223ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ruff_linter/src/checkers/logical_lines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub(crate) fn expand_indent(line: &str, indent_width: IndentWidth) -> usize {
let tab_size = indent_width.as_usize();
for c in line.bytes() {
match c {
b'\t' => indent += tab_size,
b'\t' => indent = (indent / tab_size) * tab_size + tab_size,
b' ' => indent += 1,
_ => break,
}
Expand Down

0 comments on commit ef223ec

Please sign in to comment.