Skip to content

Commit 7d650b4

Browse files
committed
TYP: bump basedpyright
1 parent 058e628 commit 7d650b4

2 files changed

Lines changed: 35 additions & 9 deletions

File tree

pixi.lock

Lines changed: 15 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/array_api_extra/_lib/_at.py

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ def add(
381381
# Note for this and all other methods based on _iop:
382382
# operator.iadd and operator.add subtly differ in behaviour, as
383383
# only iadd will trigger exceptions when y has an incompatible dtype.
384-
return self._op(_AtOp.ADD, operator.iadd, operator.add, y, copy=copy, xp=xp)
384+
return self._op(_AtOp.ADD, operator.iadd, operator.add, y, copy=copy, xp=xp) # pyright: ignore[reportUnknownArgumentType]
385385

386386
def subtract(
387387
self,
@@ -392,7 +392,12 @@ def subtract(
392392
) -> Array: # numpydoc ignore=PR01,RT01
393393
"""Apply ``x[idx] -= y`` and return the updated array."""
394394
return self._op(
395-
_AtOp.SUBTRACT, operator.isub, operator.sub, y, copy=copy, xp=xp
395+
_AtOp.SUBTRACT,
396+
operator.isub, # pyright: ignore[reportUnknownArgumentType]
397+
operator.sub,
398+
y,
399+
copy=copy,
400+
xp=xp,
396401
)
397402

398403
def multiply(
@@ -404,7 +409,12 @@ def multiply(
404409
) -> Array: # numpydoc ignore=PR01,RT01
405410
"""Apply ``x[idx] *= y`` and return the updated array."""
406411
return self._op(
407-
_AtOp.MULTIPLY, operator.imul, operator.mul, y, copy=copy, xp=xp
412+
_AtOp.MULTIPLY,
413+
operator.imul, # pyright: ignore[reportUnknownArgumentType]
414+
operator.mul,
415+
y,
416+
copy=copy,
417+
xp=xp,
408418
)
409419

410420
def divide(
@@ -416,7 +426,12 @@ def divide(
416426
) -> Array: # numpydoc ignore=PR01,RT01
417427
"""Apply ``x[idx] /= y`` and return the updated array."""
418428
return self._op(
419-
_AtOp.DIVIDE, operator.itruediv, operator.truediv, y, copy=copy, xp=xp
429+
_AtOp.DIVIDE,
430+
operator.itruediv, # pyright: ignore[reportUnknownArgumentType]
431+
operator.truediv, # pyright: ignore[reportUnknownArgumentType]
432+
y,
433+
copy=copy,
434+
xp=xp,
420435
)
421436

422437
def power(
@@ -427,7 +442,7 @@ def power(
427442
xp: ModuleType | None = None,
428443
) -> Array: # numpydoc ignore=PR01,RT01
429444
"""Apply ``x[idx] **= y`` and return the updated array."""
430-
return self._op(_AtOp.POWER, operator.ipow, operator.pow, y, copy=copy, xp=xp)
445+
return self._op(_AtOp.POWER, operator.ipow, operator.pow, y, copy=copy, xp=xp) # pyright: ignore[reportUnknownArgumentType]
431446

432447
def min(
433448
self,

0 commit comments

Comments
 (0)