Skip to content

Commit f6b48ba

Browse files
committed
fix typing in test_scalar_array
1 parent 805a8df commit f6b48ba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_array.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pickle
55
import re
66
from itertools import accumulate
7-
from typing import TYPE_CHECKING, Any, Literal
7+
from typing import TYPE_CHECKING, Any, Literal, cast
88

99
import numcodecs
1010
import numpy as np
@@ -1273,6 +1273,7 @@ def test_scalar_array(value: Any) -> None:
12731273
assert x == value
12741274
assert value == x
12751275
if isinstance(value, (int, float)):
1276+
x = cast(ScalarWrapper, x)
12761277
assert -x == -value
12771278
assert abs(x) == abs(value)
12781279
assert int(x) == int(value)

0 commit comments

Comments
 (0)