ruff
Make noqa parsing consistent and more robust
#16483
Merged

Make noqa parsing consistent and more robust #16483

dylwil3
dylwil3 dylwil3 added breaking
dylwil3 dylwil3 added suppression
dylwil3 dylwil3 added do-not-merge
dylwil3 dylwil3 added this to the v0.10 milestone 358 days ago
codspeed-hq
dylwil3
dylwil3 dylwil3 marked this pull request as draft 358 days ago
github-actions
InSyncWithFoo
dylwil3
dylwil3
dylwil3 dylwil3 marked this pull request as ready for review 357 days ago
MichaReiser
MichaReiser commented on 2025-03-04
dylwil3 dylwil3 force pushed from ae10927b to e0ea1701 355 days ago
dylwil3
dylwil3 dylwil3 marked this pull request as draft 355 days ago
dylwil3 dylwil3 marked this pull request as ready for review 355 days ago
MichaReiser
MichaReiser
dylwil3
MichaReiser
MichaReiser commented on 2025-03-07
dylwil3
MichaReiser
dylwil3 tests and snapshots to capture current behavior
da0d858a
dylwil3 match function signatures for directive and file exemption
386017ee
dylwil3 test that code text matches slice at range
3c8e0230
dylwil3 core parsing reimplementation
8e06ad55
dylwil3 update snapshots for parsing behavior
a7ec02c1
dylwil3 update noqa.py fixture and snapshot for new behavior
fa96a03f
dylwil3 emit warnings for inline and file-level exemptions
b5949d5a
dylwil3 include warnings in snapshot tests
418d2a71
dylwil3 remove ParsedFileExemption
83d4c469
dylwil3 remove Directive::lex_code
2ea73c0e
dylwil3 replace ParsedNoqaDirective with Directive everywhere
d8b90520
dylwil3 clippy
b6f66cea
dylwil3 ascii whitespace only in regex
2ac597b4
dylwil3 revert "ascii whitespace only in regex" and try again
0c45ccfb
dylwil3 try explicit case-insensitive
f88cc8de
dylwil3 hand roll noqa prefix regex
6be00e0c
dylwil3 hand roll file exemption prefix regex
018fa036
dylwil3 rewrite noqa parser with Cursor
de4e5eb6
dylwil3 update snapshots
6dd06d30
dylwil3 use public lex_codes for blanket noqa rule
81714fbd
dylwil3 truncate source range end to comment range before lexing
de9284c2
dylwil3 use text_len
5f85a756
dylwil3 typo lexess->lexes
90f3be3a
dylwil3 allow non ascii whitespace in comment after All noqa
a3eb354c
dylwil3 fold prefix stripping into lexer
0bedda21
dylwil3 dylwil3 force pushed from 48ddf252 to 0bedda21 354 days ago
dhruvmanila
dhruvmanila commented on 2025-03-10
MichaReiser
MichaReiser approved these changes on 2025-03-10
MichaReiser
MichaReiser MichaReiser changed the base branch from main to micha/ruff-0.10 351 days ago
MichaReiser MichaReiser removed do-not-merge
MichaReiser
dylwil3 smaller diff for tests
3de925d5
dylwil3 in_range instead of starts_at
729a0921
dylwil3 eat_whitespace method
03cca16b
dylwil3 test case with leading hashes and spaces
b580b93a
dylwil3 nit: simplify skip of tool prefix
f190d53c
dylwil3 allow spaces after noqa and before colon
8069e66d
dylwil3 nit: rename current to position
81709fca
dylwil3 remove need to store line in lexer
1b108b36
dylwil3 example comment for whitespace delimiters
70c22f67
dylwil3 space before colon no longer possible in blanket noqa PGH004
bde12aed
dylwil3 clippy
6b5d25b6
dylwil3 just allow arbitrary whitespace it's not a big deal
d48bb11d
dylwil3 remove unreachable branch in PGH004 implementation
ae39f619
dylwil3
dylwil3 dylwil3 merged b8f12844 into micha/ruff-0.10 350 days ago

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone