-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ruff_linter
] - Use LibCST in adjust_indentation
for mixed whitespace
#12740
[ruff_linter
] - Use LibCST in adjust_indentation
for mixed whitespace
#12740
Conversation
CodSpeed Performance ReportMerging #12740 will not alter performanceComparing Summary
|
5b03a5d
to
d165c3e
Compare
This reverts commit 3e2f778.
|
This seems like a pretty big regression. I think I would prefer just to disable the fix in case there's mixed-indentation than regressing performance by that much. |
Yeah, that is not ideal as is. I'd like to try one more alternative approach, which does already include detecting mixed indentation. |
ruff_linter
] - Remove dedent_to
usage from adjust_indentation
helperruff_linter
] - Use LibCST in adjust_indentation
for mixed whitespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
f9db08e
to
d922997
Compare
Summary
The
dedent_to
function has a difficult time with mixed whitespace.The code now conditionally uses the LibCST method if there is mixed whitespace.
Fixes #12707
Test Plan
cargo test