Skip to content

fix support "top" types #3736#4273

Open
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:3736
Open

fix support "top" types #3736#4273
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:3736

Conversation

@asukaminato0721

Copy link
Copy Markdown
Collaborator

Summary

Fixes #3736

Test Plan

@meta-cla meta-cla Bot added the cla signed label Jul 24, 2026
@asukaminato0721
asukaminato0721 marked this pull request as draft July 24, 2026 05:59
@github-actions

Copy link
Copy Markdown

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
asukaminato0721 marked this pull request as ready for review July 24, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support "top" types

1 participant