mirror of
https://github.com/python/cpython.git
synced 2025-10-14 18:59:46 +00:00
getdoc():
Remove leading whitespace from first line; remove leading and trailing blank lines from docstrings. (Patch 645938 submitted by David Goodger.)
This commit is contained in:
parent
362c7cd07b
commit
a59ef7bbe0
2 changed files with 15 additions and 7 deletions
|
@ -144,7 +144,7 @@ test(inspect.getsource(mod.StupidGit) == sourcerange(21, 46),
|
|||
test(inspect.getdoc(mod.StupidGit) ==
|
||||
'A longer,\n\nindented\n\ndocstring.', 'getdoc(mod.StupidGit)')
|
||||
test(inspect.getdoc(git.abuse) ==
|
||||
'Another\n\ndocstring\n\ncontaining\n\ntabs\n\n', 'getdoc(git.abuse)')
|
||||
'Another\n\ndocstring\n\ncontaining\n\ntabs', 'getdoc(git.abuse)')
|
||||
test(inspect.getcomments(mod.StupidGit) == '# line 20\n',
|
||||
'getcomments(mod.StupidGit)')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue