-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
perf(pycodestyle): Remove regex captures #3735
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
PR Check ResultsEcosystem✅ ecosystem check detected no changes. BenchmarkLinux
Windows
|
f86cb60
to
2c8fbb7
Compare
7c82846
to
6ca18cc
Compare
crates/ruff/src/rules/pycodestyle/snapshots/ruff__rules__pycodestyle__tests__E221_E22.py.snap
Outdated
Show resolved
Hide resolved
6ca18cc
to
5f238d7
Compare
2c8fbb7
to
58b2a7a
Compare
5f238d7
to
ba4add9
Compare
58b2a7a
to
8a08a96
Compare
ba4add9
to
59e7f10
Compare
crates/ruff/src/rules/pycodestyle/snapshots/ruff__rules__pycodestyle__tests__E274_E27.py.snap
Outdated
Show resolved
Hide resolved
crates/ruff/src/rules/pycodestyle/snapshots/ruff__rules__pycodestyle__tests__E274_E27.py.snap
Outdated
Show resolved
Hide resolved
crates/ruff/src/rules/pycodestyle/snapshots/ruff__rules__pycodestyle__tests__E274_E27.py.snap
Outdated
Show resolved
Hide resolved
crates/ruff/src/rules/pycodestyle/snapshots/ruff__rules__pycodestyle__tests__E272_E27.py.snap
Outdated
Show resolved
Hide resolved
crates/ruff/src/rules/pycodestyle/snapshots/ruff__rules__pycodestyle__tests__E221_E22.py.snap
Outdated
Show resolved
Hide resolved
crates/ruff/src/rules/pycodestyle/snapshots/ruff__rules__pycodestyle__tests__E272_E27.py.snap
Outdated
Show resolved
Hide resolved
crates/ruff/src/rules/pycodestyle/snapshots/ruff__rules__pycodestyle__tests__E274_E27.py.snap
Outdated
Show resolved
Hide resolved
crates/ruff/src/rules/pycodestyle/snapshots/ruff__rules__pycodestyle__tests__E274_E27.py.snap
Outdated
Show resolved
Hide resolved
crates/ruff/src/rules/pycodestyle/snapshots/ruff__rules__pycodestyle__tests__E274_E27.py.snap
Outdated
Show resolved
Hide resolved
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.
I trust you to resolve any necessary issues based on discussion around the deviations, but just tag me if you want eyes on anything as you follow up.
59e7f10
to
d8c87f9
Compare
@@ -9,10 +9,10 @@ expression: diagnostics | |||
fixable: false | |||
location: | |||
row: 28 | |||
column: 1 | |||
column: 2 |
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.
I checked these numbers and they match pycodestyle
crates/ruff/resources/test/fixtures/pycodestyle/E27.py:28:2: E274 tab before keyword
crates/ruff/resources/test/fixtures/pycodestyle/E27.py:30:5: E274 tab before keyword
The other tests are fixed (very hacky solution but the next PR replaces it anyway)
8a08a96
to
f62f750
Compare
02f1bbd
to
b161131
Compare
f62f750
to
7389522
Compare
b161131
to
d28f60f
Compare
d28f60f
to
fea2767
Compare
From the regex documentation:
source
This PR removes our usages of
capture_iter
withfind_iter
and and implements the whitespace-testing manually.Performance
no-logical
: pycode style rules disabledpr3715
: The base version with logical lines enabledpr3735
: This PR with logical lines enabled.We're getting closer, but a 36% regression for some cases is still heavy....