mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:39:12 +00:00
Ignore typos in snapshots (#2609)
This commit is contained in:
parent
6272293180
commit
12ed1837ee
3 changed files with 284 additions and 4 deletions
|
@ -11,16 +11,16 @@
|
|||
"Hello World".strip(r"Hello")
|
||||
|
||||
# PLE1310
|
||||
"Hello World".strip("Hel\tlo")
|
||||
"Hello World".strip("Hello\t")
|
||||
|
||||
# PLE1310
|
||||
"Hello World".strip(r"He\tllo")
|
||||
"Hello World".strip(r"Hello\t")
|
||||
|
||||
# PLE1310
|
||||
"Hello World".strip("Hel\\lo")
|
||||
"Hello World".strip("Hello\\")
|
||||
|
||||
# PLE1310
|
||||
"Hello World".strip(r"He\\llo")
|
||||
"Hello World".strip(r"Hello\\")
|
||||
|
||||
# PLE1310
|
||||
"Hello World".strip("🤣🤣🤣🤣🙃👀😀")
|
||||
|
|
|
@ -0,0 +1,278 @@
|
|||
---
|
||||
source: crates/ruff/src/rules/pylint/mod.rs
|
||||
assertion_line: 50
|
||||
expression: diagnostics
|
||||
---
|
||||
- kind:
|
||||
BadStrStripCall:
|
||||
kind: Strip
|
||||
location:
|
||||
row: 2
|
||||
column: 20
|
||||
end_location:
|
||||
row: 2
|
||||
column: 27
|
||||
fix:
|
||||
content:
|
||||
- "\"Helo\""
|
||||
location:
|
||||
row: 2
|
||||
column: 20
|
||||
end_location:
|
||||
row: 2
|
||||
column: 27
|
||||
parent: ~
|
||||
- kind:
|
||||
BadStrStripCall:
|
||||
kind: Strip
|
||||
location:
|
||||
row: 5
|
||||
column: 20
|
||||
end_location:
|
||||
row: 5
|
||||
column: 27
|
||||
fix:
|
||||
content:
|
||||
- "\"Helo\""
|
||||
location:
|
||||
row: 5
|
||||
column: 20
|
||||
end_location:
|
||||
row: 5
|
||||
column: 27
|
||||
parent: ~
|
||||
- kind:
|
||||
BadStrStripCall:
|
||||
kind: Strip
|
||||
location:
|
||||
row: 8
|
||||
column: 20
|
||||
end_location:
|
||||
row: 8
|
||||
column: 28
|
||||
fix:
|
||||
content:
|
||||
- "u\"Helo\""
|
||||
location:
|
||||
row: 8
|
||||
column: 20
|
||||
end_location:
|
||||
row: 8
|
||||
column: 28
|
||||
parent: ~
|
||||
- kind:
|
||||
BadStrStripCall:
|
||||
kind: Strip
|
||||
location:
|
||||
row: 11
|
||||
column: 20
|
||||
end_location:
|
||||
row: 11
|
||||
column: 28
|
||||
fix:
|
||||
content:
|
||||
- "r\"Helo\""
|
||||
location:
|
||||
row: 11
|
||||
column: 20
|
||||
end_location:
|
||||
row: 11
|
||||
column: 28
|
||||
parent: ~
|
||||
- kind:
|
||||
BadStrStripCall:
|
||||
kind: Strip
|
||||
location:
|
||||
row: 14
|
||||
column: 20
|
||||
end_location:
|
||||
row: 14
|
||||
column: 29
|
||||
fix:
|
||||
content:
|
||||
- "\"Helo\\t\""
|
||||
location:
|
||||
row: 14
|
||||
column: 20
|
||||
end_location:
|
||||
row: 14
|
||||
column: 29
|
||||
parent: ~
|
||||
- kind:
|
||||
BadStrStripCall:
|
||||
kind: Strip
|
||||
location:
|
||||
row: 17
|
||||
column: 20
|
||||
end_location:
|
||||
row: 17
|
||||
column: 30
|
||||
fix:
|
||||
content:
|
||||
- "r\"Helo\\t\""
|
||||
location:
|
||||
row: 17
|
||||
column: 20
|
||||
end_location:
|
||||
row: 17
|
||||
column: 30
|
||||
parent: ~
|
||||
- kind:
|
||||
BadStrStripCall:
|
||||
kind: Strip
|
||||
location:
|
||||
row: 20
|
||||
column: 20
|
||||
end_location:
|
||||
row: 20
|
||||
column: 29
|
||||
fix:
|
||||
content:
|
||||
- "\"Helo\\\\\""
|
||||
location:
|
||||
row: 20
|
||||
column: 20
|
||||
end_location:
|
||||
row: 20
|
||||
column: 29
|
||||
parent: ~
|
||||
- kind:
|
||||
BadStrStripCall:
|
||||
kind: Strip
|
||||
location:
|
||||
row: 23
|
||||
column: 20
|
||||
end_location:
|
||||
row: 23
|
||||
column: 30
|
||||
fix:
|
||||
content:
|
||||
- "r\"Helo\\\""
|
||||
location:
|
||||
row: 23
|
||||
column: 20
|
||||
end_location:
|
||||
row: 23
|
||||
column: 30
|
||||
parent: ~
|
||||
- kind:
|
||||
BadStrStripCall:
|
||||
kind: Strip
|
||||
location:
|
||||
row: 26
|
||||
column: 20
|
||||
end_location:
|
||||
row: 26
|
||||
column: 29
|
||||
fix:
|
||||
content:
|
||||
- "\"🤣🙃👀😀\""
|
||||
location:
|
||||
row: 26
|
||||
column: 20
|
||||
end_location:
|
||||
row: 26
|
||||
column: 29
|
||||
parent: ~
|
||||
- kind:
|
||||
BadStrStripCall:
|
||||
kind: Strip
|
||||
location:
|
||||
row: 30
|
||||
column: 4
|
||||
end_location:
|
||||
row: 32
|
||||
column: 3
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BadStrStripCall:
|
||||
kind: Strip
|
||||
location:
|
||||
row: 36
|
||||
column: 20
|
||||
end_location:
|
||||
row: 38
|
||||
column: 29
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BadStrStripCall:
|
||||
kind: Strip
|
||||
location:
|
||||
row: 42
|
||||
column: 4
|
||||
end_location:
|
||||
row: 44
|
||||
column: 13
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BadStrStripCall:
|
||||
kind: Strip
|
||||
location:
|
||||
row: 49
|
||||
column: 4
|
||||
end_location:
|
||||
row: 51
|
||||
column: 13
|
||||
fix: ~
|
||||
parent: ~
|
||||
- kind:
|
||||
BadStrStripCall:
|
||||
kind: Strip
|
||||
location:
|
||||
row: 61
|
||||
column: 10
|
||||
end_location:
|
||||
row: 61
|
||||
column: 19
|
||||
fix:
|
||||
content:
|
||||
- "'htp:/'"
|
||||
location:
|
||||
row: 61
|
||||
column: 10
|
||||
end_location:
|
||||
row: 61
|
||||
column: 19
|
||||
parent: ~
|
||||
- kind:
|
||||
BadStrStripCall:
|
||||
kind: LStrip
|
||||
location:
|
||||
row: 64
|
||||
column: 11
|
||||
end_location:
|
||||
row: 64
|
||||
column: 20
|
||||
fix:
|
||||
content:
|
||||
- "'htp:/'"
|
||||
location:
|
||||
row: 64
|
||||
column: 11
|
||||
end_location:
|
||||
row: 64
|
||||
column: 20
|
||||
parent: ~
|
||||
- kind:
|
||||
BadStrStripCall:
|
||||
kind: RStrip
|
||||
location:
|
||||
row: 67
|
||||
column: 11
|
||||
end_location:
|
||||
row: 67
|
||||
column: 20
|
||||
fix:
|
||||
content:
|
||||
- "'htp:/'"
|
||||
location:
|
||||
row: 67
|
||||
column: 11
|
||||
end_location:
|
||||
row: 67
|
||||
column: 20
|
||||
parent: ~
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue