Skip to content

Commit 123b11a

Browse files
committed
Add xref to pyright bug
1 parent 36a422f commit 123b11a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/array_api_extra/_lib/_funcs.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,8 @@ def isclose(
385385
) -> Array: # numpydoc ignore=PR01,RT01
386386
"""See docstring in array_api_extra._delegation."""
387387
a, b = asarrays(a, b, xp=xp)
388-
if TYPE_CHECKING: # Hack around pyright bug # pragma: no cover
388+
# FIXME https://github.com/microsoft/pyright/issues/10085
389+
if TYPE_CHECKING: # pragma: nocover
389390
assert _compat.is_array_api_obj(a)
390391
assert _compat.is_array_api_obj(b)
391392

@@ -504,13 +505,15 @@ def kron(
504505
if xp is None:
505506
xp = array_namespace(a, b)
506507
a, b = asarrays(a, b, xp=xp)
507-
if TYPE_CHECKING: # Hack around pyright bug # pragma: no cover
508+
# FIXME https://github.com/microsoft/pyright/issues/10085
509+
if TYPE_CHECKING: # pragma: nocover
508510
assert _compat.is_array_api_obj(a)
509511
assert _compat.is_array_api_obj(b)
510512

511513
singletons = (1,) * (b.ndim - a.ndim)
512514
a = xp.broadcast_to(a, singletons + a.shape)
513-
if TYPE_CHECKING: # Hack around pyright bug # pragma: no cover
515+
# FIXME https://github.com/microsoft/pyright/issues/10085
516+
if TYPE_CHECKING: # pragma: nocover
514517
assert _compat.is_array_api_obj(a)
515518

516519
nd_b, nd_a = b.ndim, a.ndim
@@ -680,7 +683,8 @@ def setdiff1d(
680683
x1 = xp.unique_values(x1)
681684
x2 = xp.unique_values(x2)
682685

683-
if TYPE_CHECKING: # Hack around pyright bug # pragma: no cover
686+
# FIXME https://github.com/microsoft/pyright/issues/10085
687+
if TYPE_CHECKING: # pragma: nocover
684688
assert _compat.is_array_api_obj(x1)
685689

686690
return x1[_helpers.in1d(x1, x2, assume_unique=True, invert=True, xp=xp)]

0 commit comments

Comments
 (0)