Skip to content

Commit

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

Simplify arithmetic operation in logical lines checker
  • Loading branch information
augustelalande committed May 9, 2024
1 parent dfe4291 commit e9d1cdd
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 = (indent / tab_size) * tab_size + tab_size,
b'\t' => indent += tab_size,
b' ' => indent += 1,
_ => break,
}
Expand Down

0 comments on commit e9d1cdd

Please sign in to comment.