-
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
Skip empty lines when determining base indentation #9795
Conversation
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
S101 | 117 | 117 | 0 | 0 | 0 |
ANN202 | 70 | 70 | 0 | 0 | 0 |
FA100 | 55 | 55 | 0 | 0 | 0 |
AIR001 | 40 | 40 | 0 | 0 | 0 |
ANN201 | 38 | 38 | 0 | 0 | 0 |
ANN001 | 28 | 28 | 0 | 0 | 0 |
D103 | 24 | 24 | 0 | 0 | 0 |
T201 | 23 | 23 | 0 | 0 | 0 |
PLC0415 | 18 | 18 | 0 | 0 | 0 |
COM812 | 14 | 14 | 0 | 0 | 0 |
SIM117 | 12 | 12 | 0 | 0 | 0 |
FBT001 | 6 | 6 | 0 | 0 | 0 |
FBT002 | 5 | 5 | 0 | 0 | 0 |
PT012 | 5 | 5 | 0 | 0 | 0 |
PTH118 | 5 | 5 | 0 | 0 | 0 |
PTH123 | 4 | 4 | 0 | 0 | 0 |
FIX002 | 4 | 4 | 0 | 0 | 0 |
TD002 | 4 | 4 | 0 | 0 | 0 |
TD003 | 4 | 4 | 0 | 0 | 0 |
D106 | 4 | 4 | 0 | 0 | 0 |
RET505 | 3 | 3 | 0 | 0 | 0 |
D101 | 3 | 3 | 0 | 0 | 0 |
D205 | 3 | 3 | 0 | 0 | 0 |
ANN401 | 3 | 3 | 0 | 0 | 0 |
B015 | 2 | 2 | 0 | 0 | 0 |
CPY001 | 2 | 2 | 0 | 0 | 0 |
D202 | 2 | 2 | 0 | 0 | 0 |
D212 | 2 | 2 | 0 | 0 | 0 |
PLW1514 | 2 | 2 | 0 | 0 | 0 |
D107 | 2 | 2 | 0 | 0 | 0 |
D400 | 2 | 2 | 0 | 0 | 0 |
D415 | 2 | 2 | 0 | 0 | 0 |
C408 | 2 | 2 | 0 | 0 | 0 |
PERF401 | 1 | 1 | 0 | 0 | 0 |
A002 | 1 | 1 | 0 | 0 | 0 |
A001 | 1 | 1 | 0 | 0 | 0 |
D100 | 1 | 1 | 0 | 0 | 0 |
D401 | 1 | 1 | 0 | 0 | 0 |
D404 | 1 | 1 | 0 | 0 | 0 |
PTH100 | 1 | 1 | 0 | 0 | 0 |
PTH120 | 1 | 1 | 0 | 0 | 0 |
D209 | 1 | 1 | 0 | 0 | 0 |
PLR0913 | 1 | 1 | 0 | 0 | 0 |
PLR0917 | 1 | 1 | 0 | 0 | 0 |
C901 | 1 | 1 | 0 | 0 | 0 |
PLR0915 | 1 | 1 | 0 | 0 | 0 |
PLR1702 | 1 | 1 | 0 | 0 | 0 |
PLR6201 | 1 | 1 | 0 | 0 | 0 |
PLR2004 | 1 | 1 | 0 | 0 | 0 |
TD004 | 1 | 1 | 0 | 0 | 0 |
RET504 | 1 | 1 | 0 | 0 | 0 |
PLR0914 | 1 | 1 | 0 | 0 | 0 |
ARG001 | 1 | 1 | 0 | 0 | 0 |
Formatter (stable)
ℹ️ ecosystem check encountered format errors. (no format changes; 2 project errors)
sphinx-doc/sphinx (error)
ruff format --no-preview --exclude tests/roots/test-pycode/cp_1251_coded.py
ruff failed
Cause: Selection of unstable rules without the `--preview` flag is not allowed. Enable preview or remove selection of:
- FURB113
- FURB131
- FURB132
openai/openai-cookbook (error)
warning: Detected debug build without --no-cache.
error: Failed to parse examples/dalle/Image_generations_edits_and_variations_with_DALL-E.ipynb:3:7:8: Unexpected token 'prompt'
Formatter (preview)
ℹ️ ecosystem check encountered format errors. (no format changes; 1 project error)
openai/openai-cookbook (error)
ruff format --preview
warning: Detected debug build without --no-cache.
error: Failed to parse examples/dalle/Image_generations_edits_and_variations_with_DALL-E.ipynb:3:7:8: Unexpected token 'prompt'
Ecosystem checks are correct. I accidentally merged #9769 previously which removed all of those rules because we started panicking on those specific files. |
Summary
It turns out we saw a panic in cases when dedenting blocks like the
def wrapper
here:Since we relied on the first line to determine the indentation, instead of the first non-empty line.
Test Plan
cargo test