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

Series str contains #793

Merged

Conversation

Rubtsowa
Copy link
Contributor

@Rubtsowa Rubtsowa commented Apr 2, 2020

No description provided.

@pep8speaks
Copy link

pep8speaks commented Apr 2, 2020

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 2020-04-03 09:32:02 UTC

Copy link
Contributor

@densmirn densmirn left a comment

Choose a reason for hiding this comment

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

I would also add test to check parameters with invalid values.

@@ -82,7 +82,7 @@ def hpat_pandas_stringmethods_upper_impl(self):

import numba
from numba.types import (Boolean, Integer, NoneType,
Omitted, StringLiteral, UnicodeType)
Omitted, StringLiteral, UnicodeType, Number, Set)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see usage of Number and Set.

Copy link
Contributor

Choose a reason for hiding this comment

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

Again, I don't see usage of Number and Set.


def hpat_pandas_stringmethods_contains_impl(self, pat, case=True, flags=0, na=None, regex=True):
if flags != 0:
raise ValueError('Parameter flags can be only 0.')
Copy link
Contributor

Choose a reason for hiding this comment

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

I propose to do something like that.

Suggested change
raise ValueError('Parameter flags can be only 0.')
raise SDCLimitation("Method contains(). Unsupported parameter. Given 'flags' != 0")

@@ -82,7 +82,7 @@ def hpat_pandas_stringmethods_upper_impl(self):

import numba
from numba.types import (Boolean, Integer, NoneType,
Omitted, StringLiteral, UnicodeType)
Omitted, StringLiteral, UnicodeType, Number, Set)
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, I don't see usage of Number and Set.


with self.assertRaises(TypingError) as raises:
hpat_func(s, pat, na=0)
msg = 'Method contains(). The object na'
Copy link
Contributor

Choose a reason for hiding this comment

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

Please provide full error message.

@AlexanderKalistratov AlexanderKalistratov merged commit 5d201ab into IntelPython:master Apr 7, 2020
@Rubtsowa Rubtsowa deleted the series_str_contains branch April 7, 2020 06:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants