Skip to content

Commit b34fc3b

Browse files
author
Blake Hawkins
committed
Replacing list concatenation with "+"
1 parent da3d0d9 commit b34fc3b

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

pandas/tests/dtypes/test_common.py

+21-15
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,13 @@ def test_is_datetimelike():
324324

325325
@pytest.mark.parametrize(
326326
"dtype",
327-
[pd.Series([1, 2])]
328-
+ ALL_INT_DTYPES
329-
+ to_numpy_dtypes(ALL_INT_DTYPES)
330-
+ ALL_EA_INT_DTYPES
331-
+ to_ea_dtypes(ALL_EA_INT_DTYPES),
327+
[
328+
type(pd.Series([1, 2])),
329+
*ALL_INT_DTYPES,
330+
*to_numpy_dtypes(ALL_INT_DTYPES),
331+
*ALL_EA_INT_DTYPES,
332+
*to_ea_dtypes(ALL_EA_INT_DTYPES)
333+
]
332334
)
333335
def test_is_integer_dtype(dtype):
334336
assert com.is_integer_dtype(dtype)
@@ -352,11 +354,13 @@ def test_is_not_integer_dtype(dtype):
352354

353355
@pytest.mark.parametrize(
354356
"dtype",
355-
[pd.Series([1, 2])]
356-
+ SIGNED_INT_DTYPES
357-
+ to_numpy_dtypes(SIGNED_INT_DTYPES)
358-
+ SIGNED_EA_INT_DTYPES
359-
+ to_ea_dtypes(SIGNED_EA_INT_DTYPES),
357+
[
358+
type(pd.Series([1, 2])),
359+
*SIGNED_INT_DTYPES,
360+
*to_numpy_dtypes(SIGNED_INT_DTYPES),
361+
*SIGNED_EA_INT_DTYPES,
362+
*to_ea_dtypes(SIGNED_EA_INT_DTYPES)
363+
]
360364
)
361365
def test_is_signed_integer_dtype(dtype):
362366
assert com.is_integer_dtype(dtype)
@@ -384,11 +388,13 @@ def test_is_not_signed_integer_dtype(dtype):
384388

385389
@pytest.mark.parametrize(
386390
"dtype",
387-
[pd.Series([1, 2], dtype=np.uint32)]
388-
+ UNSIGNED_INT_DTYPES
389-
+ to_numpy_dtypes(UNSIGNED_INT_DTYPES)
390-
+ UNSIGNED_EA_INT_DTYPES
391-
+ to_ea_dtypes(UNSIGNED_EA_INT_DTYPES),
391+
[
392+
type(pd.Series([1, 2], dtype=np.uint32)),
393+
*UNSIGNED_INT_DTYPES,
394+
*to_numpy_dtypes(UNSIGNED_INT_DTYPES),
395+
*UNSIGNED_EA_INT_DTYPES,
396+
*to_ea_dtypes(UNSIGNED_EA_INT_DTYPES)
397+
]
392398
)
393399
def test_is_unsigned_integer_dtype(dtype):
394400
assert com.is_unsigned_integer_dtype(dtype)

setup.cfg

-2
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,6 @@ ignore_errors=True
145145
[mypy-pandas.tests.arrays.test_period]
146146
ignore_errors=True
147147

148-
[mypy-pandas.tests.dtypes.test_common]
149-
ignore_errors=True
150148

151149
[mypy-pandas.tests.dtypes.test_inference]
152150
ignore_errors=True

0 commit comments

Comments
 (0)