GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — TYP: ``tile`` shape-typing by jorenham · Pull Request #32249 · numpy/numpy Conversation
|
|
Diff from mypy_primer, showing the effect of this PR on type check results on a corpus of open source code: colour (https://github.com/colour-science/colour) - colour/io/luts/lut.py:1419: error: Argument 1 to "tile" has incompatible type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None"; expected "_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]]" [arg-type] + colour/io/luts/lut.py:1419: error: Argument 1 to "tile" has incompatible type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None"; expected "Sequence[complex | str | bytes | generic[Any]] | complex | str | bytes | generic[Any]" [arg-type] - colour/io/luts/lut.py:1419: error: Argument 1 to "tile" has incompatible type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None"; expected "_SupportsArray[dtype[signedinteger[_8Bit] | signedinteger[_16Bit] | signedinteger[_32Bit] | signedinteger[_64Bit] | unsignedinteger[_8Bit] | unsignedinteger[_16Bit] | unsignedinteger[_32Bit] | unsignedinteger[_64Bit] | Any]] | _NestedSequence[_SupportsArray[dtype[signedinteger[_8Bit] | signedinteger[_16Bit] | signedinteger[_32Bit] | signedinteger[_64Bit] | unsignedinteger[_8Bit] | unsignedinteger[_16Bit] | unsignedinteger[_32Bit] | unsignedinteger[_64Bit] | Any]]]" [arg-type] + colour/io/luts/lut.py:1433: error: No overload variant of "pad" matches argument types "ndarray[Any, Any]", "tuple[int, Any | signedinteger[_8Bit] | signedinteger[_16Bit] | signedinteger[_32Bit] | signedinteger[_64Bit] | unsignedinteger[_8Bit] | unsignedinteger[_16Bit] | unsignedinteger[_32Bit] | unsignedinteger[_64Bit]]", "str", "float" [call-overload] + colour/io/luts/lut.py:1433: note: Possible overload variants: + colour/io/luts/lut.py:1433: note: def [ShapeT: tuple[int, ...], DTypeT: dtype[Any]] pad(array: ndarray[ShapeT, DTypeT], pad_width: _SupportsArray[dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[integer[Any]]]] | int | _NestedSequence[int] | dict[int, int] | dict[int, tuple[int, int]] | dict[int, int | tuple[int, int]], mode: Literal['constant', 'edge', 'linear_ramp', 'maximum', 'mean', 'median', 'minimum', 'reflect', 'symmetric', 'wrap', 'empty'] = ..., *, stat_length: _SupportsArray[dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[integer[Any]]]] | int | _NestedSequence[int] | None = ..., constant_values: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] = ..., end_values: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] = ..., reflect_type: Literal['odd', 'even'] = ...) -> ndarray[ShapeT, DTypeT] + colour/io/luts/lut.py:1433: note: def [ScalarT: generic[Any]] pad(array: _SupportsArray[dtype[ScalarT]] | _NestedSequence[_SupportsArray[dtype[ScalarT]]], pad_width: _SupportsArray[dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[integer[Any]]]] | int | _NestedSequence[int] | dict[int, int] | dict[int, tuple[int, int]] | dict[int, int | tuple[int, int]], mode: Literal['constant', 'edge', 'linear_ramp', 'maximum', 'mean', 'median', 'minimum', 'reflect', 'symmetric', 'wrap', 'empty'] = ..., *, stat_length: _SupportsArray[dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[integer[Any]]]] | int | _NestedSequence[int] | None = ..., constant_values: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] = ..., end_values: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] = ..., reflect_type: Literal['odd', 'even'] = ...) -> ndarray[tuple[Any, ...], dtype[ScalarT]] + colour/io/luts/lut.py:1433: note: def pad(array: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], pad_width: _SupportsArray[dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[integer[Any]]]] | int | _NestedSequence[int] | dict[int, int] | dict[int, tuple[int, int]] | dict[int, int | tuple[int, int]], mode: Literal['constant', 'edge', 'linear_ramp', 'maximum', 'mean', 'median', 'minimum', 'reflect', 'symmetric', 'wrap', 'empty'] = ..., *, stat_length: _SupportsArray[dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[integer[Any]]]] | int | _NestedSequence[int] | None = ..., constant_values: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] = ..., end_values: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] = ..., reflect_type: Literal['odd', 'even'] = ...) -> ndarray[tuple[Any, ...], dtype[Any]] + colour/io/luts/lut.py:1433: note: def [ShapeT: tuple[int, ...], DTypeT: dtype[Any]] pad(array: ndarray[ShapeT, DTypeT], pad_width: _SupportsArray[dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[integer[Any]]]] | int | _NestedSequence[int] | dict[int, int] | dict[int, tuple[int, int]] | dict[int, int | tuple[int, int]], mode: _ModeFunc, **kwargs: Any) -> ndarray[ShapeT, DTypeT] + colour/io/luts/lut.py:1433: note: def [ScalarT: generic[Any]] pad(array: _SupportsArray[dtype[ScalarT]] | _NestedSequence[_SupportsArray[dtype[ScalarT]]], pad_width: _SupportsArray[dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[integer[Any]]]] | int | _NestedSequence[int] | dict[int, int] | dict[int, tuple[int, int]] | dict[int, int | tuple[int, int]], mode: _ModeFunc, **kwargs: Any) -> ndarray[tuple[Any, ...], dtype[ScalarT]] + colour/io/luts/lut.py:1433: note: def pad(array: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], pad_width: _SupportsArray[dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[integer[Any]]]] | int | _NestedSequence[int] | dict[int, int] | dict[int, tuple[int, int]] | dict[int, int | tuple[int, int]], mode: _ModeFunc, **kwargs: Any) -> ndarray[tuple[Any, ...], dtype[Any]] - colour/io/luts/lut.py:1955: error: Argument 1 to "tile" has incompatible type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None"; expected "_SupportsArray[dtype[signedinteger[_8Bit] | signedinteger[_16Bit] | signedinteger[_32Bit] | signedinteger[_64Bit] | unsignedinteger[_8Bit] | unsignedinteger[_16Bit] | unsignedinteger[_32Bit] | unsignedinteger[_64Bit]]] | _NestedSequence[_SupportsArray[dtype[signedinteger[_8Bit] | signedinteger[_16Bit] | signedinteger[_32Bit] | signedinteger[_64Bit] | unsignedinteger[_8Bit] | unsignedinteger[_16Bit] | unsignedinteger[_32Bit] | unsignedinteger[_64Bit]]]]" [arg-type] + colour/io/luts/lut.py:1955: error: Argument 1 to "tile" has incompatible type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None"; expected "Sequence[complex | str | bytes | generic[Any]] | complex | str | bytes | generic[Any]" [arg-type] + colour/utilities/tests/test_array.py:1974: error: Incompatible types in assignment (expression has type "ndarray[tuple[int, int], dtype[signedinteger[_32Bit | _64Bit]]]", variable has type "ndarray[tuple[int], dtype[signedinteger[_32Bit | _64Bit]]]") [assignment] - colour/temperature/tests/test_robertson1968.py:171: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "float") [assignment] + colour/temperature/tests/test_robertson1968.py:171: error: Incompatible types in assignment (expression has type "ndarray[tuple[int, int], dtype[Any]]", variable has type "float") [assignment] - colour/temperature/tests/test_robertson1968.py:230: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "int") [assignment] + colour/temperature/tests/test_robertson1968.py:230: error: Incompatible types in assignment (expression has type "ndarray[tuple[int, int], dtype[Any]]", variable has type "int") [assignment] - colour/temperature/tests/test_planck1900.py:143: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "int") [assignment] + colour/temperature/tests/test_planck1900.py:143: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "int") [assignment] - colour/temperature/tests/test_mccamy1992.py:140: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "float") [assignment] + colour/temperature/tests/test_mccamy1992.py:140: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "float") [assignment] - colour/temperature/tests/test_krystek1985.py:142: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "int") [assignment] + colour/temperature/tests/test_krystek1985.py:142: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "int") [assignment] - colour/temperature/tests/test_kang2002.py:143: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "int") [assignment] + colour/temperature/tests/test_kang2002.py:143: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "int") [assignment] - colour/temperature/tests/test_hernandez1999.py:140: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "float") [assignment] + colour/temperature/tests/test_hernandez1999.py:140: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "float") [assignment] - colour/temperature/tests/test_cie_d.py:137: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "int") [assignment] + colour/temperature/tests/test_cie_d.py:137: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "int") [assignment] - colour/phenomena/tests/test_tmm.py:82: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "float") [assignment] + colour/phenomena/tests/test_tmm.py:82: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "float") [assignment] - colour/phenomena/tests/test_rayleigh.py:521: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "float") [assignment] + colour/phenomena/tests/test_rayleigh.py:521: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "float") [assignment] - colour/phenomena/tests/test_rayleigh.py:596: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "float") [assignment] + colour/phenomena/tests/test_rayleigh.py:596: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "float") [assignment] - colour/phenomena/tests/test_rayleigh.py:671: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "float") [assignment] + colour/phenomena/tests/test_rayleigh.py:671: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "float") [assignment] - colour/phenomena/tests/test_rayleigh.py:758: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "float") [assignment] + colour/phenomena/tests/test_rayleigh.py:758: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "float") [assignment] - colour/phenomena/tests/test_rayleigh.py:829: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "float") [assignment] + colour/phenomena/tests/test_rayleigh.py:829: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "float") [assignment] - colour/phenomena/tests/test_rayleigh.py:893: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "float") [assignment] + colour/phenomena/tests/test_rayleigh.py:893: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "float") [assignment] - colour/phenomena/tests/test_rayleigh.py:944: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "float") [assignment] + colour/phenomena/tests/test_rayleigh.py:944: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "float") [assignment] - colour/phenomena/tests/test_rayleigh.py:992: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "float") [assignment] + colour/phenomena/tests/test_rayleigh.py:992: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "float") [assignment] - colour/phenomena/tests/test_rayleigh.py:1056: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "float") [assignment] + colour/phenomena/tests/test_rayleigh.py:1056: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "float") [assignment] - colour/phenomena/tests/test_rayleigh.py:1141: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "float") [assignment] + colour/phenomena/tests/test_rayleigh.py:1141: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "float") [assignment] - colour/phenomena/tests/test_rayleigh.py:1200: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "int") [assignment] + colour/phenomena/tests/test_rayleigh.py:1200: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "int") [assignment] - colour/phenomena/tests/test_rayleigh.py:1265: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "int") [assignment] + colour/phenomena/tests/test_rayleigh.py:1265: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "int") [assignment] - colour/phenomena/tests/test_rayleigh.py:1329: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "float") [assignment] + colour/phenomena/tests/test_rayleigh.py:1329: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "float") [assignment] - colour/phenomena/tests/test_interference.py:72: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "int") [assignment] + colour/phenomena/tests/test_interference.py:72: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "int") [assignment] - colour/phenomena/tests/test_interference.py:149: error: Incompatible types in assignment (expression has type "ndarray[tuple[Any, ...], dtype[Any]]", variable has type "int") [assignment] ... (truncated 491 lines) ... optuna (https://github.com/optuna/optuna) ./optuna/study/_multi_objective.py:182: error: INTERNAL ERROR -- Please try using mypy master on GitHub: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I went over the full + colour/io/luts/lut.py:1433: error: No overload variant of "pad" matches argument types "ndarray[Any, Any]", "tuple[int, Any | signedinteger[_8Bit] | signedinteger[_16Bit] | signedinteger[_32Bit] | signedinteger[_64Bit] | unsignedinteger[_8Bit] | unsignedinteger[_16Bit] | unsignedinteger[_32Bit] | unsignedinteger[_64Bit]]", "str", "float" [call-overload] + colour/utilities/tests/test_array.py:1974: error: Incompatible types in assignment (expression has type "ndarray[tuple[int, int], dtype[signedinteger[_32Bit | _64Bit]]]", variable has type "ndarray[tuple[int], dtype[signedinteger[_32Bit | _64Bit]]]") [assignment] + colour/models/rgb/transfer_functions/tests/test_linear.py:51: error: Incompatible types in assignment (expression has type "ndarray[tuple[int], dtype[Any]]", variable has type "float") [assignment]
TLDR; nothing here points to a regression in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Thanks Joren. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.