@@ -996,11 +996,12 @@ def check_triple_double_quotes(self, definition, docstring):
996
996
997
997
'''
998
998
if docstring and '"""' in eval (docstring ) and docstring .startswith (
999
- ("'''" , "r'''" , "u'''" )):
999
+ ("'''" , "r'''" , "u'''" , "ur'''" )):
1000
1000
# Allow ''' quotes if docstring contains """, because otherwise """
1001
1001
# quotes could not be expressed inside docstring. Not in PEP 257.
1002
1002
return
1003
- if docstring and not docstring .startswith (('"""' , 'r"""' , 'u"""' )):
1003
+ if docstring and not docstring .startswith (
1004
+ ('"""' , 'r"""' , 'u"""' , 'ur"""' )):
1004
1005
quotes = "'''" if "'''" in docstring [:4 ] else "'"
1005
1006
return D300 (quotes )
1006
1007
@@ -1014,7 +1015,8 @@ def check_backslashes(self, definition, docstring):
1014
1015
'''
1015
1016
# Just check that docstring is raw, check_triple_double_quotes
1016
1017
# ensures the correct quotes.
1017
- if docstring and '\\ ' in docstring and not docstring .startswith ('r' ):
1018
+ if docstring and '\\ ' in docstring and not docstring .startswith (
1019
+ ('r' , 'ur' )):
1018
1020
return D301 ()
1019
1021
1020
1022
@check_for (Definition )
@@ -1027,7 +1029,8 @@ def check_unicode_docstring(self, definition, docstring):
1027
1029
# Just check that docstring is unicode, check_triple_double_quotes
1028
1030
# ensures the correct quotes.
1029
1031
if docstring and sys .version_info [0 ] <= 2 :
1030
- if not is_ascii (docstring ) and not docstring .startswith ('u' ):
1032
+ if not is_ascii (docstring ) and not docstring .startswith (
1033
+ ('u' , 'ur' )):
1031
1034
return D302 ()
1032
1035
1033
1036
@check_for (Definition )
0 commit comments