8000 bpo-30181: parse docstring using pydoc by brianmay · Pull Request #1505 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-30181: parse docstring using pydoc #1505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Replace comment with docstring
  • Loading branch information
brianmay committed May 24, 2017
commit ea60b7be5201dbc10388fee46a3258d9aa6301d0
7 changes: 5 additions & 2 deletions Lib/unittest/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,11 @@ def __exit__(self, exc_type, exc_value, tb):


def _get_short_description(doc):
# Return the summary line from a docstring.
# If there is no summary line, return None.
"""
Return the summary line from a docstring.

If there is no summary line, return None.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is no summary line, return None.

I don't think this is accurate. If there is no summary line, it can also return the empty string.

"""
if not doc:
return None

Expand Down
0