Commit 126a5bb
type: Annotate
Annotate `Kernel.diag()` argument `X`: use `npt.ArrayLike`.
Fixes:
```
src/nifreeze/model/gpr.py:335: error:
Argument 1 of "diag" is incompatible with supertype "Kernel";
supertype defines the argument type as
"Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]"
[override]
src/nifreeze/model/gpr.py:335: note: This violates the Liskov substitution principle
src/nifreeze/model/gpr.py:335: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
src/nifreeze/model/gpr.py:445: error:
Argument 1 of "diag" is incompatible with supertype "Kernel";
supertype defines the argument type as
"Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]"
[override]
src/nifreeze/model/gpr.py:445: note: This violates the Liskov substitution principle
src/nifreeze/model/gpr.py:335: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
```
raised for example in:
https://github.com/nipreps/nifreeze/actions/runs/12437972140/job/34728973936#step:8:93
Documentation:
https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overridesKernel.diag() argument X
1 parent bebe6f5 commit 126a5bb
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
334 | 335 | | |
335 | 336 | | |
336 | 337 | | |
337 | | - | |
| 338 | + | |
338 | 339 | | |
339 | 340 | | |
340 | 341 | | |
| |||
351 | 352 | | |
352 | 353 | | |
353 | 354 | | |
354 | | - | |
| 355 | + | |
355 | 356 | | |
356 | 357 | | |
357 | 358 | | |
| |||
444 | 445 | | |
445 | 446 | | |
446 | 447 | | |
447 | | - | |
| 448 | + | |
448 | 449 | | |
449 | 450 | | |
450 | 451 | | |
| |||
461 | 462 | | |
462 | 463 | | |
463 | 464 | | |
464 | | - | |
| 465 | + | |
465 | 466 | | |
466 | 467 | | |
467 | 468 | | |
| |||
0 commit comments