Skip to content

DOC/CI: Removing Panel specific code from validate_docstrings.py #26627

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

Merged
merged 1 commit into from
Jun 4, 2019
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