Skip to content
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

Handle NoneType docstrings to support the -OO interpreter option #1792

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions pandas/core/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ class DataFrameFormatter(object):

"""

__doc__ = __doc__ if __doc__ else ''
__doc__ += docstring_to_string

def __init__(self, frame, buf=None, columns=None, col_space=None,
Expand Down
4 changes: 3 additions & 1 deletion pandas/util/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ def __init__(self, addendum, join='', indents=0):
self.join = join

def __call__(self, func):
docitems = [func.__doc__ if func.__doc__ else '', self.addendum]
func.__doc__ = func.__doc__ if func.__doc__ else ''
self.addendum = self.addendum if self.addendum else ''
docitems = [func.__doc__, self.addendum]
func.__doc__ = ''.join(docitems)
return func

Expand Down