File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -433,20 +433,29 @@ def get_property_docstring(self, prop_name):
433
433
434
434
doc = self .__doc__ .split ('\n ' )
435
435
436
- r = re .compile (" {} :" .format (prop_name ))
437
- match = list (filter (r .match , doc ))
436
+ r = " {} :" .format (prop_name )
438
437
439
- assert len (match ) > 0 , "No matches for {} documentation" .format (prop_name )
440
- assert len (match ) == 1 , "Too many matches for {} documentation" .format (prop_name )
441
- match = match [0 ]
438
+ def find_match (str ):
439
+ if r in str :
440
+ return True
441
+ else :
442
+ return False
443
+
444
+ match = list (filter (find_match , doc ))
442
445
446
+ assert not len (match ) > 1 , "Too many matches for {} documentation" .format (prop_name )
447
+
448
+ if len (match ) == 0 :
449
+ match = ''
450
+ else :
451
+ match = match [0 ]
443
452
for i , string in enumerate (doc ):
444
453
if string == match :
445
454
break
446
455
447
456
doc_string = doc [i ][4 ::]
448
457
449
- for j in range (len (doc_string )):
458
+ for j in range (len (doc )):
450
459
try :
451
460
doc [i + 1 + j ]
452
461
except :
You can’t perform that action at this time.
0 commit comments