Skip to content

Commit

Permalink
fix: minor changes required for PR wemake-services#1187
Browse files Browse the repository at this point in the history
  • Loading branch information
Mema5 committed Feb 23, 2020
1 parent f3b5542 commit c6825cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions wemake_python_styleguide/violations/consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -2124,12 +2124,12 @@ class RawStringNotNeededViolation(TokenizeViolation):
Example::
# Correct:
s = r'This is a correct use \'
r'This is a correct use \'
# Wrong:
s = r'This string should not be prefixed with r.'
r'This string should not be prefixed with r.'
.. versionadded:: 0.14.0
.. versionadded:: 0.15.0
"""

Expand Down
2 changes: 1 addition & 1 deletion wemake_python_styleguide/visitors/tokenize/primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def _check_unnecessary_raw_string(self, token: tokenize.TokenInfo) -> None:
if 'r' in modifiers.lower():
if '\\' not in string_def.encode('unicode-escape').decode():
self.add_violation(
RawStringNotNeededViolation(token, text=token.string),
RawStringNotNeededViolation(token),
)


Expand Down

0 comments on commit c6825cb

Please sign in to comment.