You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug #900 added better typing for the select_dtypes include and exclude arguments.
However, it missed at least one allowable include variable type in the AstypeArgExt literal list.
"integer" should be added to that literal list as it is allowed in the select_dtypes include/exclude arguments and will include or exclude all integer types.
There are likely a few other numpy scalar abstract base classes are also valid here, probably everything within a dashed-line box on the Hierarchy of type objects diagram located here: https://numpy.org/doc/stable/reference/arrays.scalars.html
Of those, only "number" has been added to the Literal list, but it is likely that anyone may want to include/exclude any of the other numpy
To Reproduce
Following code produces an error in mypy:
Thanks for the report. Any additional strings/types such as "integer" that can be used in select_dtypes(), but not astype() should be added to the Literal defined here:
Describe the bug
#900 added better typing for the select_dtypes include and exclude arguments.
However, it missed at least one allowable include variable type in the AstypeArgExt literal list.
"integer" should be added to that literal list as it is allowed in the select_dtypes include/exclude arguments and will include or exclude all integer types.
There are likely a few other numpy scalar abstract base classes are also valid here, probably everything within a dashed-line box on the Hierarchy of type objects diagram located here: https://numpy.org/doc/stable/reference/arrays.scalars.html
Of those, only "number" has been added to the Literal list, but it is likely that anyone may want to include/exclude any of the other numpy
To Reproduce
Following code produces an error in mypy:
mypy error is on the line
inter_cols_ = ...
and is:Please complete the following information:
pandas-stubs
: 2.2.2.24054Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: