Skip to content

Commit

Permalink
set fix as unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
diceroll123 committed Oct 18, 2023
1 parent a7d8e87 commit 91fe859
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub(crate) fn backslashes(checker: &mut Checker, docstring: &Docstring) {
}) {
let mut diagnostic = Diagnostic::new(EscapeSequenceInDocstring, docstring.range());

diagnostic.set_fix(Fix::safe_edit(Edit::range_replacement(
diagnostic.set_fix(Fix::unsafe_edit(Edit::range_replacement(
"r".to_owned() + docstring.contents,
docstring.range(),
)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ D.py:333:5: D301 [*] Use `r"""` if any backslashes in a docstring
|
= help: Prefix docstring with `r`

Fix
Suggested fix
330 330 |
331 331 | @expect('D301: Use r""" if any backslashes in a docstring')
332 332 | def double_quotes_backslash():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ D301.py:2:5: D301 [*] Use `r"""` if any backslashes in a docstring
|
= help: Prefix docstring with `r`

Fix
Suggested fix
1 1 | def double_quotes_backslash():
2 |- """Sum\\mary."""
2 |+ r"""Sum\\mary."""
Expand Down

0 comments on commit 91fe859

Please sign in to comment.