Accept shaped arrays and scalars in broadcasting APIs - #4809
Draft
stroxler wants to merge 3 commits into
Draft
Conversation
Summary: Verify that a generic union alias preserves `IntTuple` shape inference for both JAX arrays and NumPy arrays, including independent inference for mixed inputs. Make NumPy stubs available to the JAX shape test suites so the cross-library annotations resolve normally. Differential Revision: D118557922
Summary: Add the parameter-only `ScalarAsShape` marker so scalar arguments contribute the empty shape during generic inference without becoming array subtypes. Keep parsing, projection, and matching isolated in the shape-extension integration, including branch-sensitive callable matching and overload selection. Differential Revision: D118557924
Summary: Introduce a reusable JAX array-like alias that preserves shapes from JAX and NumPy arrays while treating scalar inputs as empty shapes. Use it to express `maximum` and three-argument `where` without combinatorial overloads. Differential Revision: D118557925
Contributor
|
@stroxler has exported this pull request. If you are a Meta employee, you can view the originating Diff in D118557925. |
|
Diff from mypy_primer, showing the effect of this PR on open source code: ============================================================
SUMMARY
============================================================
Total: +89 new errors, -70 fixed errors
By preset: +18/-2 (default), +19/-2 (strict)
Projects with changes (16):
spark: +1 -1
materialize: +13 -9
twine: +0 -1
setuptools: +2 -2
operator: +2 -2
beartype: +1 -3
hydra-zen: +1 -6
pytest-autoprofile: +3 -4
pandera: +0 -1
anyio: +1 -0
pandas: +10 -24
xarray: +49 -1
porcupine: +2 -5
poetry: +2 -0
spack: +2 -3
discord.py: +0 -8
============================================================
FULL DIFF DETAILS
------------------------------------------------------------
spark (https://github.com/apache/spark)
- ERROR python/pyspark/pandas/namespace.py:929:40-72: The type of this argument is unknown [unknown-argument-type]
+ ERROR python/pyspark/pandas/namespace.py:929:40-72: Argument `TextFileReader` is not assignable to parameter `pobj` with type `DataFrame | Index | Series` in function `from_pandas` [bad-argument-type]
materialize (https://github.com/MaterializeInc/materialize)
- ERROR test/clusterd-test-driver/run-local.py:82:5-56: Result of call expression is of type `CompletedProcess[Any]` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR test/clusterd-test-driver/run-local.py:82:5-56: Result of call expression is of type `CompletedProcess[str]` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR misc/python/materialize/cli/orchestratord.py:137:9-145:22: The type of `environments` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR misc/python/materialize/cli/orchestratord.py:149:46-55: The type of this argument is unknown [unknown-argument-type]
- ERROR misc/python/materialize/cli/orchestratord.py:155:17-33: The type of this argument is unknown [unknown-argument-type]
- ERROR misc/python/materialize/cli/orchestratord.py:163:61-77: The type of this argument is unknown [unknown-argument-type]
+ ERROR misc/python/materialize/cli/orchestratord.py:163:9-78: Result of call expression is of type `str` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR misc/python/materialize/cli/orchestratord.py:164:9-76: Result of call expression is of type `str` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR misc/python/materialize/cli/orchestratord.py:166:13-168:14: Result of call expression is of type `str` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR misc/python/materialize/cli/orchestratord.py:179:9-184:10: Result of call expression is of type `str` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR misc/python/materialize/cli/orchestratord.py:205:9-210:10: Result of call expression is of type `str` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR misc/python/materialize/cli/orchestratord.py:212:9-217:10: Result of call expression is of type `str` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR misc/python/materialize/cli/orchestratord.py:225:9-239:10: Result of call expression is of type `str` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR misc/python/materialize/cli/orchestratord.py:240:9-62: Result of call expression is of type `str` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR misc/python/materialize/cli/orchestratord.py:317:5-82: Result of call expression is of type `str` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR misc/python/materialize/cli/orchestratord.py:320:5-327:6: Result of call expression is of type `Any | None` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR misc/python/materialize/cli/orchestratord.py:320:5-327:6: Result of call expression is of type `str | None` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR misc/python/materialize/cli/orchestratord.py:375:9-379:10: Result of call expression is of type `str` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR misc/python/materialize/cli/orchestratord.py:368:15-373:26: The type of `pod` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR misc/python/materialize/cli/orchestratord.py:377:13-16: The type of this argument is unknown [unknown-argument-type]
- ERROR misc/python/materialize/cli/orchestratord.py:399:13-406:21: The type of `resource_id` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
+ ERROR misc/python/materialize/cli/orchestratord.py:455:5-460:6: Result of call expression is of type `str` and is not used; assign to `_` if this is intentional [unused-call-result]
twine (https://github.com/pypa/twine)
- ERROR twine/utils.py:62:26-27: The type of this argument is unknown [unknown-argument-type]
setuptools (https://github.com/pypa/setuptools)
+ ERROR setuptools/command/bdist_egg.py:162:13-70: Result of call expression is of type `Command` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR setuptools/command/bdist_egg.py:174:15-55: The type of `cmd` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR setuptools/command/bdist_egg.py:189:15-63: The type of `cmd` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
+ ERROR setuptools/command/bdist_egg.py:216:13-85: Result of call expression is of type `Command` and is not used; assign to `_` if this is intentional [unused-call-result]
operator (https://github.com/canonical/operator)
- ERROR ops/storage.py:410:9-70: Result of call expression is of type `CompletedProcess[Any]` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR ops/storage.py:410:9-70: Result of call expression is of type `CompletedProcess[str]` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR ops/storage.py:434:9-48: Result of call expression is of type `CompletedProcess[Any]` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR ops/storage.py:434:9-48: Result of call expression is of type `CompletedProcess[str]` and is not used; assign to `_` if this is intentional [unused-call-result]
beartype (https://github.com/beartype/beartype)
+ ERROR beartype/_decor/_nontype/_api/decorstandard.py:151:12-30: Returned type `_lru_cache_wrapper[Unknown]` is not assignable to declared return type `BeartypeableT` [bad-return]
- ERROR beartype/_decor/_nontype/_api/decorstandard.py:144:28-57: The type of `lru_cache_configured` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR beartype/_decor/_nontype/_api/decorstandard.py:148:26-60: The type of `pseudofunc_checked` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR beartype/_decor/_nontype/_api/decorstandard.py:151:12-30: Returning implicit Any from function declared to return "BeartypeableT" [no-any-return-implicit]
hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
- ERROR src/hydra_zen/structured_configs/_implementations.py:1156:19-1162:14: The type of `out` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR src/hydra_zen/structured_configs/_implementations.py:1164:30-33: The type of this argument is unknown [unknown-argument-type]
- ERROR src/hydra_zen/structured_configs/_implementations.py:1166:20-23: Returning implicit Any from function declared to return "DataClass_ | DictConfig | Enum | ListConfig | Mapping[Any, HydraSupportedType] | Path | PosixPath | Sequence[HydraSupportedType] | WindowsPath | _MISSING_TYPE | bool | bytearray | bytes | float | int | memoryview | str | tuple[HydraSupportedType, ...] | type[DataClass_] | None" [no-any-return-implicit]
- ERROR src/hydra_zen/structured_configs/_implementations.py:1267:24-65: Returning implicit Any from function declared to return "DataClass_ | DictConfig | Enum | ListConfig | Mapping[Any, HydraSupportedType] | Path | PosixPath | Sequence[HydraSupportedType] | WindowsPath | _MISSING_TYPE | bool | bytearray | bytes | float | int | memoryview | str | tuple[HydraSupportedType, ...] | type[DataClass_] | None" [no-any-return-implicit]
+ ERROR src/hydra_zen/structured_configs/_implementations.py:3243:9-3249:10: Result of call expression is of type `type[Builds[type[dict]]]` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR src/hydra_zen/structured_configs/_implementations.py:3752:12-87: Returning implicit Any from function declared to return "HydraPartialBuilds[type[_T]] | ZenPartialBuilds[type[_T]]" [no-any-return-implicit]
- ERROR src/hydra_zen/wrapper/_implementations.py:936:20-55: Returning implicit Any from function declared to return "DataClass_ | DictConfig | ListConfig | type[DataClass_]" [no-any-return-implicit]
pytest-autoprofile (https://gitlab.com/TTsangSC/pytest-autoprofile)
- ERROR src/pytest_autoprofile/_doctest.py:478:20-68: Returning Any from function declared to return "CodeType" [no-any-return-explicit]
- ERROR src/pytest_autoprofile/_doctest.py:518:16-40: Returning implicit Any from function declared to return "CodeType" [no-any-return-implicit]
+ ERROR src/pytest_autoprofile/_doctest.py:518:29-39: `<anonymous>` is an open TypedDict with unknown extra items, which cannot be unpacked into a callable without `**kwargs` in function `types.CodeType.replace` [open-unpacking]
- ERROR src/pytest_autoprofile/_test_utils.py:1029:13-45: Argument `list[LiteralString] | Unknown` is not assignable to parameter `outlines` with type `list[str]` in function `_pytest.pytester.RunResult.__init__` [bad-argument-type]
- ERROR src/pytest_autoprofile/_test_utils.py:1030:13-45: Argument `list[LiteralString] | Unknown` is not assignable to parameter `errlines` with type `list[str]` in function `_pytest.pytester.RunResult.__init__` [bad-argument-type]
+ ERROR src/pytest_autoprofile/_test_utils.py:1029:14-25: Implicit conversion of `str` to `bool` is not allowed [implicit-bool]
+ ERROR src/pytest_autoprofile/_test_utils.py:1030:14-25: Implicit conversion of `str` to `bool` is not allowed [implicit-bool]
pandera (https://github.com/pandera-dev/pandera)
- ERROR pandera/typing/pandas.py:211:66-67: Unused `# type: ignore` comment [unused-type-ignore]
anyio (https://github.com/agronholm/anyio)
+ ERROR src/anyio/_core/_tempfile.py:209:28-41: `AsyncFile[str]` is not assignable to attribute `_async_file` with type `AsyncFile[AnyStr]` [bad-assignment]
pandas (https://github.com/pandas-dev/pandas)
- ERROR pandas/core/frame.py:959:16-45: Returning implicit Any from function declared to return "str" [no-any-return-implicit]
- ERROR pandas/core/series.py:1562:16-45: Returning implicit Any from function declared to return "str" [no-any-return-implicit]
- ERROR pandas/io/clipboards.py:196:22-45: The type of `objstr` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR pandas/tests/frame/methods/test_rename.py:89:18-44: The type of `result` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR pandas/tests/frame/methods/test_rename.py:92:31-37: The type of this argument is unknown [unknown-argument-type]
+ ERROR pandas/tests/frame/methods/test_rename.py:92:31-37: Argument `None` is not assignable to parameter `left` with type `DataFrame` in function `pandas._testing.asserters.assert_frame_equal` [bad-argument-type]
- ERROR pandas/tests/io/formats/test_to_html.py:170:14-55: The type of `result` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
+ ERROR pandas/tests/io/json/test_deprecated_kwargs.py:40:27-33: Argument `JsonReader[Literal['frame']]` is not assignable to parameter `left` with type `DataFrame` in function `pandas._testing.asserters.assert_frame_equal` [bad-argument-type]
- ERROR pandas/tests/io/json/test_deprecated_kwargs.py:38:18-51: The type of `result` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR pandas/tests/io/json/test_deprecated_kwargs.py:40:27-33: The type of this argument is unknown [unknown-argument-type]
- ERROR pandas/tests/io/parser/test_c_parser_only.py:989:18-991:10: The type of `result` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
+ ERROR pandas/tests/io/parser/test_c_parser_only.py:992:11-22: Cannot index into `TextFileReader` [bad-index]
- ERROR pandas/tests/io/parser/test_c_parser_only.py:992:11-28: The type of `arr` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR pandas/tests/io/parser/test_c_parser_only.py:995:17-20: The type of this argument is unknown [unknown-argument-type]
- ERROR pandas/tests/io/parser/test_c_parser_only.py:1007:18-1009:10: The type of `result` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
+ ERROR pandas/tests/io/parser/test_c_parser_only.py:1010:11-22: Cannot index into `TextFileReader` [bad-index]
- ERROR pandas/tests/io/parser/test_c_parser_only.py:1010:11-28: The type of `arr` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR pandas/tests/io/parser/test_c_parser_only.py:1011:16-40: The type of `expected` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR pandas/tests/io/parser/test_c_parser_only.py:1012:17-20: The type of this argument is unknown [unknown-argument-type]
- ERROR pandas/tests/io/parser/test_c_parser_only.py:1012:37-45: The type of this argument is unknown [unknown-argument-type]
- ERROR pandas/tests/io/parser/test_c_parser_only.py:1050:18-85: The type of `result` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
+ ERROR pandas/tests/io/parser/test_c_parser_only.py:1056:12-23: Cannot index into `TextFileReader` [bad-index]
+ ERROR pandas/tests/io/parser/test_c_parser_only.py:1057:12-23: Cannot index into `TextFileReader` [bad-index]
+ ERROR pandas/tests/io/parser/test_c_parser_only.py:1058:12-23: Cannot index into `TextFileReader` [bad-index]
- ERROR pandas/tests/io/parser/test_c_parser_only.py:1074:18-85: The type of `result` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
+ ERROR pandas/tests/io/parser/test_c_parser_only.py:1080:12-23: Cannot index into `TextFileReader` [bad-index]
+ ERROR pandas/tests/io/parser/test_c_parser_only.py:1081:12-23: Cannot index into `TextFileReader` [bad-index]
- ERROR pandas/tests/io/parser/test_parallel_read.py:1228:20-47: The type of `expected` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR pandas/tests/io/parser/test_parallel_read.py:1229:35-43: The type of this argument is unknown [unknown-argument-type]
+ ERROR pandas/tests/io/parser/test_parallel_read.py:1229:35-43: Argument `TextFileReader` is not assignable to parameter `right` with type `DataFrame` in function `pandas._testing.asserters.assert_frame_equal` [bad-argument-type]
- ERROR pandas/tests/io/test_common.py:361:26-63: The type of `result` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR pandas/tests/io/test_common.py:362:28-66: The type of `expected` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR pandas/tests/io/test_common.py:363:39-45: The type of this argument is unknown [unknown-argument-type]
- ERROR pandas/tests/io/test_common.py:363:47-55: The type of this argument is unknown [unknown-argument-type]
xarray (https://github.com/pydata/xarray)
- ERROR xarray/plot/accessor.py:136:16-62: Returning implicit Any from function declared to return "FacetGrid[DataArray] | list[Unknown]" [no-any-return-implicit]
+ ERROR xarray/tests/test_backends.py:3150:13-83: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3151:13-3153:14: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3202:13-3204:14: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3208:13-3213:14: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3232:13-59: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3233:13-70: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3241:13-59: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3245:17-74: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3250:13-70: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3254:17-3256:18: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3260:13-3262:14: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3264:17-3266:18: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3271:13-70: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3273:17-84: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3278:13-70: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3280:17-3282:18: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3287:13-70: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3289:17-3294:18: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3303:13-70: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3305:17-3307:18: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3320:13-70: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3321:13-89: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3341:13-89: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3346:13-89: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3366:13-76: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3371:13-83: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3382:13-70: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3392:13-3394:14: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3399:13-89: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3516:17-3522:18: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3541:13-56: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3543:17-3545:18: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3571:13-74: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3580:13-75: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3587:13-3589:14: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3600:17-59: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3608:13-80: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3617:17-3619:18: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3631:17-3633:18: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3640:17-86: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3647:17-3649:18: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3655:17-3660:18: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3667:17-84: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3714:13-59: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3726:13-60: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3741:13-71: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3747:17-77: Result of call expression is of type `ZarrStore` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3756:13-60: Result of call expression is of type `ZarrStore | Unknown` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR xarray/tests/test_backends.py:3763:17-64: Result of call expression is of type `ZarrStore | Unknown` and is not used; assign to `_` if this is intentional [unused-call-result]
porcupine (https://github.com/Akuli/porcupine)
- ERROR porcupine/plugins/git_right_click.py:74:20-21: The type of this argument is unknown [unknown-argument-type]
- ERROR porcupine/plugins/git_right_click.py:83:20-21: The type of this argument is unknown [unknown-argument-type]
+ ERROR porcupine/plugins/git_right_click.py:57:22-38: Object of class `str` has no attribute `decode` [missing-attribute]
+ ERROR porcupine/plugins/git_right_click.py:58:24-40: Object of class `str` has no attribute `decode` [missing-attribute]
- ERROR porcupine/plugins/git_status.py:92:58-66: The type of this argument is unknown [unknown-argument-type]
- ERROR porcupine/plugins/git_status.py:101:14-22: The type of this argument is unknown [unknown-argument-type]
- ERROR porcupine/plugins/git_status.py:104:58-62: The type of this argument is unknown [unknown-argument-type]
poetry (https://github.com/python-poetry/poetry)
+ ERROR src/poetry/utils/env/site_packages.py:207:35-209:10: `list[tuple[Path, Any]]` is not assignable to `tuple[Path, Any]` [bad-assignment]
+ ERROR src/poetry/utils/env/site_packages.py:213:35-215:10: `list[tuple[Path, Any]]` is not assignable to `tuple[Path, Any]` [bad-assignment]
spack (https://github.com/spack/spack)
- ERROR lib/spack/spack/build_environment.py:280:16-49: Returning implicit Any from function declared to return "str | None" [no-any-return-implicit]
+ ERROR lib/spack/spack/main.py:322:9-23: Class member `SpackArgumentParser.add_subparsers` overrides parent class `ArgumentParser` in an inconsistent manner [bad-override]
- ERROR lib/spack/spack/main.py:366:25-371:14: The type of `subparser` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR lib/spack/spack/test/spec_dag.py:447:21-52: The type of `traversal` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
+ ERROR lib/spack/spack/util/gpg.py:942:9-45: Result of call expression is of type `Unknown | None` and is not used; assign to `_` if this is intentional [unused-call-result]
discord.py (https://github.com/Rapptz/discord.py)
- ERROR discord/guild.py:1531:16-1538:10: The type of `data` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR discord/guild.py:1539:62-71: The type of this argument is unknown [unknown-argument-type]
- ERROR discord/guild.py:1637:16-1639:10: The type of `data` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR discord/guild.py:1640:63-72: The type of this argument is unknown [unknown-argument-type]
- ERROR discord/guild.py:1745:16-1747:10: The type of `data` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR discord/guild.py:1748:63-72: The type of this argument is unknown [unknown-argument-type]
- ERROR discord/guild.py:1793:16-1795:10: The type of `data` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR discord/guild.py:1796:66-75: The type of this argument is unknown [unknown-argument-type] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary: Introduce a reusable JAX array-like alias that preserves shapes from JAX and NumPy arrays while treating scalar inputs as empty shapes. Use it to express
maximumand three-argumentwherewithout combinatorial overloads.Differential Revision: D118557925