BlogDocs

[`pycodestyle`] Add blank line(s) rules (`E301`, `E302`, `E303`, `E304`, `E305`, `E306`)(#9266)

Merged
Merging
hoel-bagard:blank_lines_non_logical
(
aea3493
) into
main
(
fdb5eef
)
-4%
IMPROVEMENTS
7
REGRESSIONS
1
UNTOUCHED
22
NEW
0
DROPPED
0
IGNORED
0

Benchmarks

Failed

linter/all-with-preview-rules[numpy/ctypeslib.py]Regression
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules::linter/all-with-preview-rules[numpy/ctypeslib.py]
-4%
4.5 ms
4.7 ms

Improved

lexer[numpy/globals.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer::lexer[numpy/globals.py]
+26%
47.1 µs
37.4 µs
lexer[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer::lexer[numpy/ctypeslib.py]
+10%
325.7 µs
295.4 µs
parser[numpy/globals.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser::parser[numpy/globals.py]
+10%
258.9 µs
234.9 µs
parser[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser::parser[numpy/ctypeslib.py]
+9%
2.2 ms
2.1 ms
parser[large/dataset.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser::parser[large/dataset.py]
+8%
12.5 ms
11.6 ms
parser[pydantic/types.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser::parser[pydantic/types.py]
+7%
4.9 ms
4.5 ms
parser[unicode/pypinyin.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser::parser[unicode/pypinyin.py]
+7%
849 µs
792.8 µs

Passed

lexer[unicode/pypinyin.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer::lexer[unicode/pypinyin.py]
+3%
104.7 µs
101.2 µs
linter/all-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules::linter/all-rules[unicode/pypinyin.py]
0%
2.3 ms
2.3 ms
lexer[pydantic/types.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer::lexer[pydantic/types.py]
0%
665.9 µs
666.4 µs
linter/all-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules::linter/all-rules[numpy/globals.py]
0%
695.1 µs
695.7 µs
lexer[large/dataset.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer::lexer[large/dataset.py]
0%
1.5 ms
1.5 ms
formatter[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter::formatter[numpy/ctypeslib.py]
0%
2 ms
2 ms
formatter[large/dataset.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter::formatter[large/dataset.py]
-1%
9.8 ms
9.8 ms
formatter[unicode/pypinyin.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter::formatter[unicode/pypinyin.py]
-1%
691.9 µs
696.1 µs
linter/default-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules::linter/default-rules[numpy/globals.py]
-1%
193 µs
194.2 µs
linter/default-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules::linter/default-rules[pydantic/types.py]
-1%
2 ms
2 ms
formatter[pydantic/types.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter::formatter[pydantic/types.py]
-1%
3.7 ms
3.7 ms
linter/all-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules::linter/all-rules[pydantic/types.py]
-1%
8 ms
8 ms
formatter[numpy/globals.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter::formatter[numpy/globals.py]
-1%
268 µs
270.8 µs
linter/all-with-preview-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules::linter/all-with-preview-rules[unicode/pypinyin.py]
-1%
2.5 ms
2.5 ms
linter/all-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules::linter/all-rules[numpy/ctypeslib.py]
-2%
4 ms
4.1 ms
linter/default-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules::linter/default-rules[large/dataset.py]
-2%
4.1 ms
4.2 ms
linter/default-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules::linter/default-rules[unicode/pypinyin.py]
-2%
376.2 µs
383.7 µs
linter/all-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules::linter/all-rules[large/dataset.py]
-2%
16.5 ms
16.8 ms
linter/default-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules::linter/default-rules[numpy/ctypeslib.py]
-3%
954.3 µs
979.7 µs
linter/all-with-preview-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules::linter/all-with-preview-rules[pydantic/types.py]
-3%
9.3 ms
9.6 ms
linter/all-with-preview-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules::linter/all-with-preview-rules[numpy/globals.py]
-3%
755.3 µs
779.5 µs
linter/all-with-preview-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules::linter/all-with-preview-rules[large/dataset.py]
-3%
18.7 ms
19.3 ms

Commits

Click on a commit to change the comparison range
base
main
fdb5eef
0%
Merge with upstream.
fa55850
9 months ago
by hoel-bagard
-4%
Move check to the tokens' file.
94fe6ef
9 months ago
by hoel-bagard
+4%
Remove unused import.
f2d4957
9 months ago
by hoel-bagard
0%
Fix rule placement in the registry.
c9cf6b6
9 months ago
by hoel-bagard
0%
Ignore clippy warnings.
6f3aa5c
9 months ago
by hoel-bagard
0%
Split if conditions into multiple ifs.
55a918d
9 months ago
by hoel-bagard
0%
Fix 2 false positives linked to indentation.
9f2268c
9 months ago
by hoel-bagard
0%
Fix false positive caused by bad async handling.
66f4dd4
9 months ago
by hoel-bagard
0%
Add test fixture.
3aac64d
9 months ago
by hoel-bagard
0%
Remove async as a top level token.
b7727c5
9 months ago
by hoel-bagard
-5%
Merge remote-tracking branch 'origin/main' into blank_lines_non_logical
280ba51
9 months ago
by MichaReiser
0%
Fix clippy errors.
273a711
9 months ago
by hoel-bagard
+6%
Merge branch 'blank_lines_non_logical' of github.com:hoel-bagard/ruff into blank_lines_non_logical
f9a0d2d
9 months ago
by MichaReiser
-6%
Reorder tests.
b244f22
8 months ago
by hoel-bagard
0%
Add comments to the text fixture.
f814990
8 months ago
by hoel-bagard
+6%
Use BlankLines enum and keep track of the blank lines range.
2c08381
8 months ago
by hoel-bagard
0%
Remove line.blank_lines_len and use BlankLines enum instead. Do range replacement instead of using blank_lines_len + deletion in order to avoid unsafe edits on Windows.
fddc740
8 months ago
by hoel-bagard
0%
Add E304 fixture.
c2f6a0c
8 months ago
by hoel-bagard
-1%
Improve E304 fix.
7ee8946
8 months ago
by hoel-bagard
0%
Match pycodestyle error message for E305.
24bf585
8 months ago
by hoel-bagard
+1%
docs: add comment about preceding_blank_lines vs blank_lines.
71d9057
8 months ago
by hoel-bagard
0%
Merge branch 'main' into blank_lines_non_logical
181fdee
8 months ago
by MichaReiser
0%
Move status update logic into its own function, mark rules as preview
8392f20
8 months ago
by MichaReiser
0%
Introduce `blank_lines.range` method
0ddcca4
8 months ago
by MichaReiser
0%
Use `universal_newlines` for decorator fix
de559d8
8 months ago
by MichaReiser
0%
Small code simpliciations
db137d9
8 months ago
by MichaReiser
0%
add wrongly indented comment test
85302d5
8 months ago
by hoel-bagard
0%
Fix error message capitalization.
a28f916
8 months ago
by hoel-bagard
-4%
Remove unnecessary state variables
aea3493
8 months ago
by MichaReiser
ResourcesHomePricingDocsBlogGitHubChangelog
Copyright © 2024 CodSpeed Technology SAS. All rights reserved.