-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
fix(typing): #983 return type of StringMethods.match #990
fix(typing): #983 return type of StringMethods.match #990
Conversation
Hi @Dr-Irv thank you for the comment. In #983 (comment) you mentioned:
I partially fixed it.
How can I capture this expectation?
I do not get this suggestion. Could you elaborate?
|
In # The _TS type is what is used for the result of str.split with expand=True
_TS = TypeVar("_TS", DataFrame, MultiIndex)
class StringMethods(NoNewAttributesMixin, Generic[T, _TS]): You need to create an additional Then the Then you change the references to See the pattern used with I'll let you address that change before firing off the CI. |
Hi @Dr-Irv , thanks for the explanations. I have made the changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the stubs, instead of using npt.NDArray[np.bool_]
, can you use np_ndarray_bool
which you can import from pandas._typing
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @cmp0xff
assert_type()
to assert the type of any return value