File tree 2 files changed +7
-12
lines changed
2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -251,10 +251,7 @@ def _parse_param_list(self, content):
251
251
r"`(?P<name>(?:~\w+\.)?[a-zA-Z0-9_.-]+)`|"
252
252
r" (?P<name2>[a-zA-Z0-9_.-]+))\s*" , re .X )
253
253
254
- if sys .version_info [0 ] >= 3 :
255
- zerowidthspace = '\u200B '
256
- else :
257
- zerowidthspace = '\xE2 \x80 \x8B '
254
+ empty_description = '..'
258
255
259
256
def _parse_see_also (self , content ):
260
257
"""
@@ -489,7 +486,7 @@ def _str_see_also(self, func_role):
489
486
last_had_desc = True
490
487
else :
491
488
last_had_desc = False
492
- out += self ._str_indent ([self .zerowidthspace ])
489
+ out += self ._str_indent ([self .empty_description ])
493
490
494
491
if last_had_desc :
495
492
out += ['' ]
Original file line number Diff line number Diff line change @@ -332,15 +332,13 @@ def _strip_blank_lines(s):
332
332
333
333
334
334
def line_by_line_compare (a , b ):
335
- if sys .version_info .major >= 3 :
336
- zerowidthspace = '\u200B '
337
- else :
338
- zerowidthspace = '\xE2 \x80 \x8B '
335
+ empty_description = '..'
336
+ rgx = re .compile (r"^\s+" + re .escape (empty_description ) + "$" )
339
337
340
- a = textwrap .dedent (a ). replace ( zerowidthspace , '' )
338
+ a = textwrap .dedent (a )
341
339
b = textwrap .dedent (b )
342
- a = [l .rstrip () for l in _strip_blank_lines (a ).split ('\n ' )]
343
- b = [l .rstrip () for l in _strip_blank_lines (b ).split ('\n ' )]
340
+ a = [rgx . sub ( '' , l .rstrip () ) for l in _strip_blank_lines (a ).split ('\n ' )]
341
+ b = [rgx . sub ( '' , l .rstrip () ) for l in _strip_blank_lines (b ).split ('\n ' )]
344
342
assert_list_equal (a , b )
345
343
346
344
You can’t perform that action at this time.
0 commit comments