Skip to content

Commit e9d1cdd

Browse files
Simplify arithmetic operation in logical lines checker (#11346)
## Summary Simplify arithmetic operation in logical lines checker
1 parent dfe4291 commit e9d1cdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ruff_linter/src/checkers/logical_lines.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub(crate) fn expand_indent(line: &str, indent_width: IndentWidth) -> usize {
2424
let tab_size = indent_width.as_usize();
2525
for c in line.bytes() {
2626
match c {
27-
b'\t' => indent = (indent / tab_size) * tab_size + tab_size,
27+
b'\t' => indent += tab_size,
2828
b' ' => indent += 1,
2929
_ => break,
3030
}

0 commit comments

Comments
 (0)