Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Conversation

@Rubtsowa
Copy link
Contributor

No description provided.

@Rubtsowa Rubtsowa requested a review from samaid December 30, 2019 15:03
@overload_method(StringMethodsType, 'istitle')
def hpat_pandas_stringmethods_istitle(self):
"""
hpat_pandas_series_str_is_docstring_tmpl = """
Copy link
Contributor

Choose a reason for hiding this comment

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

I think better to name it "sdc_pandas_series_str_docstring_template"

Pandas Series method :meth:`pandas.core.strings.StringMethods.isalnum()` implementation.

Note: Unicode type of list elements are supported only. Numpy.NaN is not supported as elements.
hpat_pandas_stringmethods_istitle.__doc__ = hpat_pandas_series_str_is_docstring_tmpl.format(**{
Copy link
Contributor

@kozlov-alexey kozlov-alexey Dec 30, 2019

Choose a reason for hiding this comment

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

I think it's better to do this for all function in a single loop, iterating over keys, values of a dict like:

stringmethods_funcs = {
    'istitle':  hpat_pandas_stringmethods_istitle,
     ...
}

And then:

for name, method in  stringmethods_funcs.items():
    stringmethods_funcs[name].__doc__ = sdc_pandas_series_str_docstring_template.format(**{name})

Copy link
Contributor

@kozlov-alexey kozlov-alexey left a comment

Choose a reason for hiding this comment

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

Looks good, but I think filling the doc attributes can be done in a loop.

@pep8speaks
Copy link

pep8speaks commented Dec 31, 2019

Hello @Rubtsowa! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2019-12-31 13:54:41 UTC

@densmirn densmirn merged commit 50178e8 into IntelPython:master Jan 4, 2020
@Rubtsowa Rubtsowa deleted the doc_gen_for_str branch April 7, 2020 07:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants