-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Fix mypy errors in testcommon py #29179
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
Changes from 106 commits
b34fc3b
a266c69
4d27ef2
c208bbe
0e556c2
2cfc88f
7b8c744
5fbbe9e
5506b82
ad01c8b
2d2f220
009ffc4
3940401
b106ef3
429ed6e
ac4469c
1939942
6ce48d9
b036967
ac45185
6c93ef1
a8cbd11
1f20f63
d5f430a
78d3420
0f93b07
1846dc6
1f49aa8
08d66f3
140102b
c8dd72a
3c80277
1e12510
06ba9f5
4892735
f992870
c4f0b5c
4feb8ac
cf22fcb
217358f
46af140
bd64ab7
d63cfa2
d9750c1
3df6488
d449b73
19f76cd
4ff76bd
f9020a2
49bb2e1
2833cb4
219d18c
c594594
1707f2a
4dc532f
a0446b0
38b923a
5ce7b1a
052a64a
41933cc
22a8337
586a9e7
1e9a047
3fbb0bc
cc93fdc
1979625
dd5d1c5
091bb06
6983800
9a98680
0aa913e
b634636
4879491
bec7043
eda17f9
c56d68a
051e152
fbe52f8
96833c3
cfd0bb3
8d9005d
cb4130b
5ea715e
a05829b
4abe6d8
4d519f9
08cf353
f2c42dc
946781d
291afc3
a23a589
8f9769c
adfd4de
58aa92b
53cc892
846bf91
0d69e54
c1f19f2
c006074
6758c4d
8c143b6
9708036
84fe5d0
e92a6eb
ca180a6
d21b9b2
0dc0cc5
05f3b16
8d21fe0
a3eea24
d01d5bb
3f37553
3ba0b50
1fe031d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
from typing import Any, List, Union | ||
|
||
import numpy as np | ||
import pytest | ||
|
||
|
@@ -13,6 +15,7 @@ | |
) | ||
|
||
import pandas as pd | ||
from pandas._typing import Dtype, ExtensionDtype | ||
from pandas.conftest import ( | ||
ALL_EA_INT_DTYPES, | ||
ALL_INT_DTYPES, | ||
|
@@ -322,9 +325,13 @@ def test_is_datetimelike(): | |
assert com.is_datetimelike(s) | ||
|
||
|
||
integer_dtypes = [] # type: List[Union[Series, str, str, Any, ExtensionDtype] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should only need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also I think you can just add all of the elements this should contain here, rather than defining and adding this later |
||
|
||
|
||
@pytest.mark.parametrize( | ||
"dtype", | ||
[pd.Series([1, 2])] | ||
integer_dtypes | ||
+ [pd.Series([1, 2])] | ||
+ ALL_INT_DTYPES | ||
+ to_numpy_dtypes(ALL_INT_DTYPES) | ||
+ ALL_EA_INT_DTYPES | ||
|
@@ -350,9 +357,13 @@ def test_is_not_integer_dtype(dtype): | |
assert not com.is_integer_dtype(dtype) | ||
|
||
|
||
signed_integer_dtypes = [] # type: List[Union[pd.Series, str, Dtype]] | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"dtype", | ||
[pd.Series([1, 2])] | ||
signed_integer_dtypes | ||
+ [pd.Series([1, 2])] | ||
+ SIGNED_INT_DTYPES | ||
+ to_numpy_dtypes(SIGNED_INT_DTYPES) | ||
+ SIGNED_EA_INT_DTYPES | ||
|
@@ -382,9 +393,13 @@ def test_is_not_signed_integer_dtype(dtype): | |
assert not com.is_signed_integer_dtype(dtype) | ||
|
||
|
||
unsigned_integer_dtypes = [] # type: List[Union[Series, str, str, Any, ExtensionDtype] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment here |
||
|
||
|
||
@pytest.mark.parametrize( | ||
"dtype", | ||
[pd.Series([1, 2], dtype=np.uint32)] | ||
unsigned_integer_dtypes | ||
+ [pd.Series([1, 2], dtype=np.uint32)] | ||
+ UNSIGNED_INT_DTYPES | ||
+ to_numpy_dtypes(UNSIGNED_INT_DTYPES) | ||
+ UNSIGNED_EA_INT_DTYPES | ||
|
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.
ExtensionDtype needs to come from pandas.core.dtypes.dtypes