Skip to content

Commit 4eb9610

Browse files
committed
Docstring may also be prefixed with U and R.
1 parent 9726e10 commit 4eb9610

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pycodestyle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def lru_cache(maxsize=128): # noqa as it's a fake implementation.
133133
RAISE_COMMA_REGEX = re.compile(r'raise\s+\w+\s*,')
134134
RERAISE_COMMA_REGEX = re.compile(r'raise\s+\w+\s*,.*,\s*\w+\s*$')
135135
ERRORCODE_REGEX = re.compile(r'\b[A-Z]\d{3}\b')
136-
DOCSTRING_REGEX = re.compile(r'u?r?["\']')
136+
DOCSTRING_REGEX = re.compile(r'(u|r|ur|ru)?["\']', re.IGNORECASE)
137137
EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[\[({] | [\]}),;:]')
138138
WHITESPACE_AFTER_COMMA_REGEX = re.compile(r'[,;:]\s*(?: |\t)')
139139
COMPARE_SINGLETON_REGEX = re.compile(r'(\bNone|\bFalse|\bTrue)?\s*([=!]=)'

0 commit comments

Comments
 (0)