Skip to content

Commit d8ec3a3

Browse files
authored
Add type hints to test_dtypes (#7858)
1 parent 05c7888 commit d8ec3a3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

xarray/tests/test_dtypes.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@
1818
([np.bytes_, np.unicode_], np.object_),
1919
],
2020
)
21-
def test_result_type(args, expected):
21+
def test_result_type(args, expected) -> None:
2222
actual = dtypes.result_type(*args)
2323
assert actual == expected
2424

2525

26-
def test_result_type_scalar():
26+
def test_result_type_scalar() -> None:
2727
actual = dtypes.result_type(np.arange(3, dtype=np.float32), np.nan)
2828
assert actual == np.float32
2929

3030

31-
def test_result_type_dask_array():
31+
def test_result_type_dask_array() -> None:
3232
# verify it works without evaluating dask arrays
3333
da = pytest.importorskip("dask.array")
3434
dask = pytest.importorskip("dask")
@@ -50,7 +50,7 @@ def error():
5050

5151

5252
@pytest.mark.parametrize("obj", [1.0, np.inf, "ab", 1.0 + 1.0j, True])
53-
def test_inf(obj):
53+
def test_inf(obj) -> None:
5454
assert dtypes.INF > obj
5555
assert dtypes.NINF < obj
5656

@@ -85,7 +85,7 @@ def test_inf(obj):
8585
("V", (np.dtype("O"), "nan")), # dtype('V')
8686
],
8787
)
88-
def test_maybe_promote(kind, expected):
88+
def test_maybe_promote(kind, expected) -> None:
8989
# 'g': np.float128 is not tested : not available on all platforms
9090
# 'G': np.complex256 is not tested : not available on all platforms
9191

@@ -94,7 +94,7 @@ def test_maybe_promote(kind, expected):
9494
assert str(actual[1]) == expected[1]
9595

9696

97-
def test_nat_types_membership():
97+
def test_nat_types_membership() -> None:
9898
assert np.datetime64("NaT").dtype in dtypes.NAT_TYPES
9999
assert np.timedelta64("NaT").dtype in dtypes.NAT_TYPES
100100
assert np.float64 not in dtypes.NAT_TYPES

0 commit comments

Comments
 (0)