Skip to content
Merged
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
13 changes: 4 additions & 9 deletions scripts/validate_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,14 +539,9 @@ def first_line_ends_in_dot(self):
if self.doc:
return self.doc.split('\n')[0][-1] == '.'

@property
def deprecated_with_directive(self):
return '.. deprecated:: ' in (self.summary + self.extended_summary)

@property
def deprecated(self):
return (self.name.startswith('pandas.Panel')
or self.deprecated_with_directive)
return '.. deprecated:: ' in (self.summary + self.extended_summary)

@property
def mentioned_private_classes(self):
Expand Down Expand Up @@ -674,7 +669,7 @@ def get_validation_data(doc):
errs.append(error('GL07',
correct_sections=', '.join(correct_order)))

if (doc.deprecated_with_directive
if (doc.deprecated
and not doc.extended_summary.startswith('.. deprecated:: ')):
errs.append(error('GL09'))

Expand Down Expand Up @@ -859,9 +854,9 @@ def validate_all(prefix, ignore_deprecated=False):

seen[shared_code_key] = func_name

# functions from introspecting Series, DataFrame and Panel
# functions from introspecting Series and DataFrame
api_item_names = set(list(zip(*api_items))[0])
for class_ in (pandas.Series, pandas.DataFrame, pandas.Panel):
for class_ in (pandas.Series, pandas.DataFrame):
for member in inspect.getmembers(class_):
func_name = 'pandas.{}.{}'.format(class_.__name__, member[0])
if (not member[0].startswith('_')
Expand Down