fix support "top" types #3736#4273
Open
asukaminato0721 wants to merge 1 commit into
Open
Conversation
|
Diff from mypy_primer, showing the effect of this PR on open source code: rotki (https://github.com/rotki/rotki)
+ ERROR rotkehlchen/tests/unit/test_lido_csm_metrics.py:19:28-40: Cannot call callable with unknown parameter types [invalid-argument]
pytest (https://github.com/pytest-dev/pytest)
+ ERROR src/_pytest/recwarn.py:172:24-41: Cannot call callable with unknown parameter types [invalid-argument]
scikit-learn (https://github.com/scikit-learn/scikit-learn)
- ERROR sklearn/cluster/_agglomerative.py:587:63-71: Argument `((...) -> object) | str | Unknown` is not assignable to parameter `metric` with type `Literal['braycurtis', 'c', 'canberra', 'cb', 'cblock', 'ch', 'cheb', 'cheby', 'chebychev', 'chebyshev', 'cityblock', 'co', 'correlation', 'cos', 'cosine', 'dice', 'e', 'eu', 'euclid', 'euclidean', 'h', 'ha', 'hamm', 'hamming', 'j', 'ja', 'jacc', 'jaccard', 'jensenshannon', 'js', 'm', 'mah', 'mahal', 'mahalanobis', 'mi', 'minkowski', 'pnorm', 'rogerstanimoto', 'russellrao', 's', 'se', 'seuclidean', 'sokalsneath', 'sqe', 'sqeuclid', 'sqeuclidean', 'yule'] | ((ndarray[tuple[int], dtype[float64]], ndarray[tuple[int], dtype[float64]]) -> numpy.bool | float | floating | integer | None)` in function `scipy.cluster.hierarchy._hierarchy_impl.linkage` [bad-argument-type]
+ ERROR sklearn/cluster/_agglomerative.py:587:63-71: Argument `((...) -> object) | ((Materialization) -> object) | str | Unknown` is not assignable to parameter `metric` with type `Literal['braycurtis', 'c', 'canberra', 'cb', 'cblock', 'ch', 'cheb', 'cheby', 'chebychev', 'chebyshev', 'cityblock', 'co', 'correlation', 'cos', 'cosine', 'dice', 'e', 'eu', 'euclid', 'euclidean', 'h', 'ha', 'hamm', 'hamming', 'j', 'ja', 'jacc', 'jaccard', 'jensenshannon', 'js', 'm', 'mah', 'mahal', 'mahalanobis', 'mi', 'minkowski', 'pnorm', 'rogerstanimoto', 'russellrao', 's', 'se', 'seuclidean', 'sokalsneath', 'sqe', 'sqeuclid', 'sqeuclidean', 'yule'] | ((ndarray[tuple[int], dtype[float64]], ndarray[tuple[int], dtype[float64]]) -> numpy.bool | float | floating | integer | None)` in function `scipy.cluster.hierarchy._hierarchy_impl.linkage` [bad-argument-type]
strawberry (https://github.com/strawberry-graphql/strawberry)
+ ERROR strawberry/cli/utils/__init__.py:23:42-44: Cannot call callable with unknown parameter types [invalid-argument]
zulip (https://github.com/zulip/zulip)
- ERROR zerver/lib/rest.py:112:16-28: Returned type `tuple[(...) -> object, set[str]]` is not assignable to declared return type `HttpResponse | tuple[(...) -> HttpResponse, set[str]]` [bad-return]
+ ERROR zerver/lib/rest.py:112:16-28: Returned type `tuple[(Materialization) -> object, set[str]]` is not assignable to declared return type `HttpResponse | tuple[(...) -> HttpResponse, set[str]]` [bad-return]
+ ERROR zerver/tests/test_slack_importer.py:3271:29-40: Cannot call callable with unknown parameter types [invalid-argument]
pandas (https://github.com/pandas-dev/pandas)
+ ERROR pandas/io/parsers/python_parser.py:755:56-83: No matching overload found for function `pandas.io.parsers.base_parser.evaluate_callable_usecols` called with arguments: ((Materialization) -> object, list[Interval[Unknown] | Timedelta | Timestamp | bool | bytes | complex | complexfloating | date | datetime | datetime64 | float | floating | int | integer | str | timedelta | timedelta64 | None]) [no-matching-overload]
xarray (https://github.com/pydata/xarray)
+ ERROR xarray/testing/strategies.py:374:13-30: `(Materialization) -> object` is not assignable to variable `_array_strategy_fn` with type `ArrayStrategyFn[Unknown]` [bad-assignment]
|
asukaminato0721
marked this pull request as ready for review
July 24, 2026 15:12
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
Fixes #3736
Test Plan