Skip to content

Conversation

A5rocks
Copy link
Collaborator

@A5rocks A5rocks commented Oct 8, 2025

I discovered this while investigating #20013. I'm not sure there's a better test case though. This PR also masks some errors (by providing a better type context for some messages), but I feel like that's alright.

This PR ensures that we don't output messages from the first pass of overloads, where we decide what to do.

I discovered this while investigating python#20013. I'm not sure there's a better test case though.

This comment has been minimized.

@A5rocks
Copy link
Collaborator Author

A5rocks commented Oct 8, 2025

Primer seems not great, I'll have to take a better look later...

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Oct 8, 2025

Diff from mypy_primer, showing the effect of this PR on open source code:

cki-lib (https://gitlab.com/cki-project/cki-lib) - tests/kcidb/test_validate.py:200: error: Unpacked dict entry 0 has incompatible type "Collection[str]"; expected "SupportsKeysAndGetItem[str, str]" [dict-item] sphinx (https://github.com/sphinx-doc/sphinx) - sphinx/transforms/__init__.py: note: In member "apply" of class "GlossarySorter": + sphinx/transforms/__init__.py: note: In function "apply": Expression (https://github.com/cognitedata/Expression) - expression/extra/parser.py:276: error: Argument 1 to "join" of "str" has incompatible type "_A"; expected "Iterable[str]" [arg-type] - README.py:287: error: Unsupported operand types for < ("int" and "_TSource") [operator] - README.py:288: error: Unsupported operand types for + ("int" and "_TSource") [operator] freqtrade (https://github.com/freqtrade/freqtrade) - freqtrade/templates/FreqaiExampleStrategy.py:245: error: Unsupported left operand type for & ("tuple[Index[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | list[Any] | slice[Any, Any, Any] | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...], ...]") [operator] - freqtrade/templates/FreqaiExampleStrategy.py:255: error: Unsupported left operand type for & ("tuple[Index[Any] | Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any] | list[Any] | slice[Any, Any, Any] | tuple[str | bytes | date | datetime | timedelta | <7 more items> | complex | integer[Any] | floating[Any] | complexfloating[Any, Any], ...], ...]") [operator] 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant