Skip to content

Conversation

@AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Nov 2, 2025

Summary

Test Plan

@AlexWaygood AlexWaygood added the ty Multi-file analysis & type inference label Nov 2, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2025

Diagnostic diff on typing conformance tests

No changes detected when running ty on typing conformance tests ✅

@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2025

mypy_primer results

Changes were detected when running on open source projects
mitmproxy (https://github.com/mitmproxy/mitmproxy)
+ mitmproxy/net/check.py:23:9: error[invalid-argument-type] Argument to bound method `decode` is incorrect: Expected `bytes`, found `AnyStr@is_valid_host`
+ mitmproxy/net/check.py:29:23: error[invalid-argument-type] Argument to bound method `endswith` is incorrect: Expected `str`, found `AnyStr@is_valid_host`
+ mitmproxy/net/check.py:29:23: error[invalid-argument-type] Argument to bound method `endswith` is incorrect: Expected `bytes`, found `AnyStr@is_valid_host`
+ mitmproxy/net/check.py:29:43: error[invalid-argument-type] Argument to bound method `endswith` is incorrect: Expected `str | tuple[str, ...]`, found `Literal[b"."]`
+ mitmproxy/net/check.py:32:43: error[invalid-argument-type] Argument to bound method `split` is incorrect: Expected `bytes`, found `AnyStr@is_valid_host`
+ mitmproxy/net/check.py:32:43: error[no-matching-overload] No overload of bound method `split` matches arguments
+ mitmproxy/net/check.py:36:30: error[invalid-argument-type] Argument to bound method `decode` is incorrect: Expected `bytes`, found `AnyStr@is_valid_host`
- Found 1888 diagnostics
+ Found 1895 diagnostics

artigraph (https://github.com/artigraph/artigraph)
- src/arti/internal/type_hints.py:177:37: error[invalid-argument-type] Argument to function `_check_issubclass` is incorrect: Expected `type`, found `T@lenient_issubclass & ~tuple[object, ...]`
- Found 169 diagnostics
+ Found 168 diagnostics

vision (https://github.com/pytorch/vision)
- torchvision/datasets/utils.py:416:16: error[invalid-return-type] Return type does not match returned value: expected `T@verify_str_arg`, found `str`
- torchvision/datasets/utils.py:426:12: error[invalid-return-type] Return type does not match returned value: expected `T@verify_str_arg`, found `str`
- Found 1491 diagnostics
+ Found 1489 diagnostics

Tanjun (https://github.com/FasterSpeeding/Tanjun)
- tanjun/annotations.py:1949:74: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int | float`, found `(int | float) & ~int`
- tanjun/annotations.py:1996:74: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int | float`, found `(int | float) & ~int`
- tanjun/annotations.py:2110:75: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int | float`, found `_NumberT@__getitem__ & ~float`
- Found 143 diagnostics
+ Found 140 diagnostics

xarray (https://github.com/pydata/xarray)
- xarray/coding/cftime_offsets.py:1517:16: error[invalid-return-type] Return type does not match returned value: expected `T_FreqStr@_legacy_to_new_freq`, found `str & ~AlwaysFalsy`
+ xarray/coding/cftime_offsets.py:1519:49: error[unsupported-operator] Operator `not in` is not supported for types `str` and `T_FreqStr@_legacy_to_new_freq`, in comparing `Literal["ME"]` with `T_FreqStr@_legacy_to_new_freq & ~AlwaysFalsy`
- xarray/coding/cftime_offsets.py:1520:9: error[invalid-assignment] Object of type `str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1520:9: error[invalid-assignment] Object of type `Unknown | str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1520:16: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1520:16: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1521:53: error[unsupported-operator] Operator `not in` is not supported for types `str` and `T_FreqStr@_legacy_to_new_freq`, in comparing `Literal["QE"]` with `T_FreqStr@_legacy_to_new_freq & ~AlwaysFalsy`
- xarray/coding/cftime_offsets.py:1522:9: error[invalid-assignment] Object of type `str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1522:9: error[invalid-assignment] Object of type `Unknown | str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1522:16: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1522:16: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1523:52: error[unsupported-operator] Operator `not in` is not supported for types `str` and `T_FreqStr@_legacy_to_new_freq`, in comparing `Literal["YS"]` with `T_FreqStr@_legacy_to_new_freq & ~AlwaysFalsy`
- xarray/coding/cftime_offsets.py:1524:9: error[invalid-assignment] Object of type `str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1524:9: error[invalid-assignment] Object of type `Unknown | str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1524:16: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1524:16: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1526:12: error[unsupported-operator] Operator `in` is not supported for types `str` and `T_FreqStr@_legacy_to_new_freq`, in comparing `Literal["A-"]` with `T_FreqStr@_legacy_to_new_freq & ~AlwaysFalsy`
- xarray/coding/cftime_offsets.py:1530:13: error[invalid-assignment] Object of type `str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1530:13: error[invalid-assignment] Object of type `Unknown | str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1530:20: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1530:20: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1531:14: error[unsupported-operator] Operator `in` is not supported for types `str` and `T_FreqStr@_legacy_to_new_freq`, in comparing `Literal["Y-"]` with `T_FreqStr@_legacy_to_new_freq & ~AlwaysFalsy`
- xarray/coding/cftime_offsets.py:1532:13: error[invalid-assignment] Object of type `str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1532:13: error[invalid-assignment] Object of type `Unknown | str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1532:20: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1532:20: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1533:14: error[invalid-argument-type] Argument to bound method `endswith` is incorrect: Expected `str`, found `T_FreqStr@_legacy_to_new_freq`
- xarray/coding/cftime_offsets.py:1535:13: error[invalid-assignment] Object of type `str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1535:13: error[invalid-assignment] Object of type `Unknown | str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1535:20: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1535:20: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1536:14: error[unsupported-operator] Operator `not in` is not supported for types `str` and `T_FreqStr@_legacy_to_new_freq`, in comparing `Literal["YE"]` with `T_FreqStr@_legacy_to_new_freq & ~AlwaysFalsy`
+ xarray/coding/cftime_offsets.py:1536:35: error[invalid-argument-type] Argument to bound method `endswith` is incorrect: Expected `str`, found `T_FreqStr@_legacy_to_new_freq`
- xarray/coding/cftime_offsets.py:1538:13: error[invalid-assignment] Object of type `str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1538:13: error[invalid-assignment] Object of type `Unknown | str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1538:20: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1538:20: error[no-matching-overload] No overload of bound method `replace` matches arguments
- xarray/coding/cftime_offsets.py:1540:9: error[invalid-assignment] Object of type `str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1540:9: error[invalid-assignment] Object of type `Unknown | str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1540:16: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1540:16: error[no-matching-overload] No overload of bound method `replace` matches arguments
- xarray/coding/cftime_offsets.py:1542:9: error[invalid-assignment] Object of type `str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1542:9: error[invalid-assignment] Object of type `Unknown | str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1542:16: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1542:16: error[no-matching-overload] No overload of bound method `replace` matches arguments
- xarray/coding/cftime_offsets.py:1544:9: error[invalid-assignment] Object of type `str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1544:9: error[invalid-assignment] Object of type `Unknown | str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1544:16: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1544:16: error[no-matching-overload] No overload of bound method `replace` matches arguments
- xarray/coding/cftime_offsets.py:1546:9: error[invalid-assignment] Object of type `str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1546:9: error[invalid-assignment] Object of type `Unknown | str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1546:16: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1546:16: error[no-matching-overload] No overload of bound method `replace` matches arguments
- xarray/coding/cftime_offsets.py:1548:9: error[invalid-assignment] Object of type `str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1548:9: error[invalid-assignment] Object of type `Unknown | str` is not assignable to `T_FreqStr@_legacy_to_new_freq`
- xarray/coding/cftime_offsets.py:1550:12: error[invalid-return-type] Return type does not match returned value: expected `T_FreqStr@_legacy_to_new_freq`, found `(str & ~AlwaysFalsy) | T_FreqStr@_legacy_to_new_freq`
+ xarray/coding/cftime_offsets.py:1548:16: error[no-matching-overload] No overload of bound method `replace` matches arguments
+ xarray/coding/cftime_offsets.py:1548:16: error[no-matching-overload] No overload of bound method `replace` matches arguments
- xarray/computation/rolling.py:1192:19: error[invalid-argument-type] Argument to bound method `_to_temp_dataset` is incorrect: Expected `DataArray`, found `T_Xarray@Coarsen`
- xarray/computation/rolling.py:1216:20: error[invalid-argument-type] Argument to bound method `_from_temp_dataset` is incorrect: Argument type `T_Xarray@Coarsen` does not satisfy upper bound `DataArray` of type variable `Self`
+ xarray/core/indexes.py:1893:24: error[invalid-argument-type] Argument to bound method `create_variables` is incorrect: Expected `Index`, found `T_PandasOrXarrayIndex@Indexes`
- Found 1733 diagnostics
+ Found 1762 diagnostics

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/utilities/templating.py:92:47: error[invalid-argument-type] Argument to function `find_placeholders` is incorrect: Argument type `object` does not satisfy constraints (`str`, `int`, `int | float`, `bool`, `dict[Any, Any]`, `list[Any]`, `None`) of type variable `T`
- src/prefect/utilities/templating.py:94:47: error[invalid-argument-type] Argument to function `find_placeholders` is incorrect: Argument type `object` does not satisfy constraints (`str`, `int`, `int | float`, `bool`, `dict[Any, Any]`, `list[Any]`, `None`) of type variable `T`
- src/prefect/utilities/templating.py:166:20: error[invalid-return-type] Return type does not match returned value: expected `T@apply_values | type[NotSet]`, found `str`
- src/prefect/utilities/templating.py:199:25: error[invalid-assignment] Object of type `str` is not assignable to `T@apply_values`
- src/prefect/utilities/templating.py:201:21: error[invalid-assignment] Object of type `str` is not assignable to `T@apply_values`
- src/prefect/utilities/templating.py:203:20: error[invalid-return-type] Return type does not match returned value: expected `T@apply_values | type[NotSet]`, found `str | T@apply_values`
- src/prefect/utilities/templating.py:207:29: error[no-matching-overload] No overload of function `apply_values` matches arguments
- src/prefect/utilities/templating.py:214:17: error[invalid-assignment] Method `__setitem__` of type `bound method dict[str, Any].__setitem__(key: str, value: Any, /) -> None` cannot be called with a key of type `object` and a value of type `Unknown & ~<class 'NotSet'>` on object of type `dict[str, Any]`
- src/prefect/utilities/templating.py:216:17: error[invalid-assignment] Method `__setitem__` of type `bound method dict[str, Any].__setitem__(key: str, value: Any, /) -> None` cannot be called with a key of type `object` and a value of type `object` on object of type `dict[str, Any]`
- src/prefect/utilities/templating.py:222:29: error[no-matching-overload] No overload of function `apply_values` matches arguments
- src/prefect/utilities/templating.py:311:29: error[no-matching-overload] No overload of bound method `get` matches arguments
- src/prefect/utilities/templating.py:320:13: error[invalid-assignment] Method `__setitem__` of type `bound method dict[str, Any].__setitem__(key: str, value: Any, /) -> None` cannot be called with a key of type `object` and a value of type `Unknown` on object of type `dict[str, Any]`
- src/prefect/utilities/templating.py:336:20: error[invalid-return-type] Return type does not match returned value: expected `T@resolve_block_document_references | dict[str, Any]`, found `str`
- src/prefect/utilities/templating.py:412:20: error[invalid-return-type] Return type does not match returned value: expected `T@resolve_variables`, found `str`
- src/prefect/utilities/templating.py:432:25: error[invalid-assignment] Object of type `str` is not assignable to `T@resolve_variables`
- src/prefect/utilities/templating.py:434:25: error[invalid-assignment] Object of type `str` is not assignable to `T@resolve_variables`
- src/prefect/utilities/templating.py:435:20: error[invalid-return-type] Return type does not match returned value: expected `T@resolve_variables`, found `str | T@resolve_variables`
- Found 3301 diagnostics
+ Found 3284 diagnostics

hydpy (https://github.com/hydpy-dev/hydpy)
- hydpy/core/devicetools.py:2541:20: error[invalid-return-type] Return type does not match returned value: expected `tuple[t@_make_tuple | None, t@_make_tuple | None]`, found `tuple[None | str | int, None | str | int]`
- hydpy/core/devicetools.py:2724:20: error[invalid-return-type] Return type does not match returned value: expected `tuple[t@_make_tuple | None, t@_make_tuple | None]`, found `tuple[None | str | int, None | str | int]`
- Found 678 diagnostics
+ Found 676 diagnostics

static-frame (https://github.com/static-frame/static-frame)
- static_frame/core/node_values.py:176:20: error[invalid-return-type] Return type does not match returned value: expected `TVContainer_co@InterfaceValues`, found `@Todo | IndexHierarchy | Series[Any, Any] | Index[Any]`
- static_frame/core/node_values.py:178:23: warning[possibly-missing-attribute] Attribute `index` may be missing on object of type `TVContainer_co@InterfaceValues`
- Found 1989 diagnostics
+ Found 1987 diagnostics

pandas (https://github.com/pandas-dev/pandas)
- pandas/core/algorithms.py:214:16: error[invalid-return-type] Return type does not match returned value: expected `ArrayLikeT@_reconstruct_data`, found `ExtensionArray`
- pandas/core/arrays/datetimes.py:2891:13: error[invalid-assignment] Object of type `Timestamp` is not assignable to `_TimestampNoneT1@_maybe_normalize_endpoints`
+ pandas/core/arrays/datetimes.py:2891:13: error[invalid-assignment] Object of type `Unknown | Timestamp` is not assignable to `_TimestampNoneT1@_maybe_normalize_endpoints`
+ pandas/core/arrays/datetimes.py:2891:21: error[invalid-argument-type] Argument to bound method `normalize` is incorrect: Argument type `_TimestampNoneT1@_maybe_normalize_endpoints` does not satisfy upper bound `Timestamp` of type variable `Self`
- pandas/core/arrays/datetimes.py:2894:13: error[invalid-assignment] Object of type `Timestamp` is not assignable to `_TimestampNoneT2@_maybe_normalize_endpoints`
+ pandas/core/arrays/datetimes.py:2894:13: error[invalid-assignment] Object of type `Unknown | Timestamp` is not assignable to `_TimestampNoneT2@_maybe_normalize_endpoints`
+ pandas/core/arrays/datetimes.py:2894:19: error[invalid-argument-type] Argument to bound method `normalize` is incorrect: Argument type `_TimestampNoneT2@_maybe_normalize_endpoints` does not satisfy upper bound `Timestamp` of type variable `Self`
+ pandas/io/stata.py:2257:12: error[unsupported-operator] Operator `+` is unsupported between objects of type `AnyStr@_pad_bytes & ~bytes` and `LiteralString`
- pandas/io/stata.py:2256:16: error[invalid-return-type] Return type does not match returned value: expected `AnyStr@_pad_bytes`, found `bytes`
- pandas/io/stata.py:2257:12: error[invalid-return-type] Return type does not match returned value: expected `AnyStr@_pad_bytes`, found `str`
No memory usage changes detected ✅

@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2025

ecosystem-analyzer results

Lint rule Added Removed Changed
no-matching-overload 25 3 0
invalid-assignment 0 7 14
invalid-argument-type 11 8 0
invalid-return-type 0 15 0
unsupported-operator 7 0 0
possibly-missing-attribute 0 1 0
Total 43 34 14

Full report with detailed diff (timing results)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ecosystem-analyzer ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants