| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Source commit: python/typeshed@5397d43
|
You'll probably need to cherry pick #13093 again |
Sorry, something went wrong.
|
@hauntsaninja Oh, right. I will CP now. |
Sorry, something went wrong.
Fixes python#13091 Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
|
N.B. This version of typeshed also drops support for 3.6, so you may also have to reapply d22899f to fix the CI |
Sorry, something went wrong.
|
@AlexWaygood Oh, great, I thought I would need top fix it myself :-) |
Sorry, something went wrong.
|
Also FYI the main culprits for the primer diff are:
|
Sorry, something went wrong.
|
Diff from mypy_primer, showing the effect of this PR on open source code: ignite (https://github.com/pytorch/ignite)
+ ignite/handlers/time_profilers.py:257: error: Unused "type: ignore" comment
mypy (https://github.com/python/mypy)
+ mypy/test/testpep561.py:117: error: Unused "type: ignore[operator]" comment
rotki (https://github.com/rotki/rotki)
+ rotkehlchen/chain/ethereum/modules/adex/types.py:251: error: Unused "type: ignore" comment
+ rotkehlchen/chain/ethereum/modules/adex/types.py:252: error: Unused "type: ignore" comment
+ rotkehlchen/chain/ethereum/modules/adex/types.py:253: error: Unused "type: ignore" comment
+ rotkehlchen/chain/ethereum/modules/adex/adex.py:786: error: Unused "type: ignore" comment
pydantic (https://github.com/samuelcolvin/pydantic)
+ pydantic/color.py:199: error: Unused "type: ignore" comment
psycopg (https://github.com/psycopg/psycopg)
+ tests/test_adapt.py:412: error: Unused "type: ignore" comment
werkzeug (https://github.com/pallets/werkzeug)
+ src/werkzeug/serving.py:224: error: Unused "type: ignore" comment
sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/util/typing.py: note: In function "_restify_py36":
+ sphinx/util/typing.py:269:26: error: Module has no attribute "GenericMeta"; maybe "Generic"? [attr-defined]
+ sphinx/util/typing.py: note: In function "_stringify_py36":
+ sphinx/util/typing.py:507:33: error: Module has no attribute "GenericMeta"; maybe "Generic"? [attr-defined]
+ sphinx/util/typing.py: note: At top level:
+ sphinx/util/typing.py:509: error: Unused "type: ignore" comment
+ sphinx/util/typing.py:510: error: Unused "type: ignore" comment
+ sphinx/util/typing.py:511: error: Unused "type: ignore" comment
+ sphinx/util/typing.py:512: error: Unused "type: ignore" comment
+ sphinx/util/typing.py:515: error: Unused "type: ignore" comment
+ sphinx/util/typing.py:516: error: Unused "type: ignore" comment
ibis (https://github.com/ibis-project/ibis)
- ibis/tests/expr/test_datatypes.py:35: error: List comprehension has incompatible type List[Tuple[str, GeoSpatial]]; expected List[Tuple[Collection[object], Variadic]]
- ibis/backends/postgres/registry.py:172: error: List item 0 has incompatible type "Tuple[str, Callable[[Any, Any], Any]]"; expected "Tuple[str, Callable[[VarArg(Any)], str]]"
- ibis/backends/postgres/registry.py:191: error: Cannot infer type of lambda
urllib3 (https://github.com/urllib3/urllib3)
+ test/with_dummyserver/test_https.py:463: error: Item "socket" of "Union[socket, Any]" has no attribute "server_hostname" [union-attr]
+ test/with_dummyserver/test_https.py:784: error: Item "socket" of "Union[socket, Any]" has no attribute "version" [union-attr]
+ test/with_dummyserver/test_https.py:882: error: Item "socket" of "Union[socket, Any]" has no attribute "version" [union-attr]
prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/utilities/asyncutils.py:181: error: Argument 1 to "wraps" has incompatible type "T"; expected "Callable[..., Any]"
- src/prefect/__init__.py:79: error: Incompatible types in assignment (expression has type "List[Prefect1ImportInterceptor]", variable has type "List[_MetaPathFinder]")
- src/prefect/__init__.py:79: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
- src/prefect/__init__.py:79: note: Consider using "Sequence" instead, which is covariant
- src/prefect/__init__.py:79: error: Unsupported operand types for + ("List[Prefect1ImportInterceptor]" and "List[_MetaPathFinder]")
spark (https://github.com/apache/spark)
+ python/pyspark/ml/tuning.py:464: error: Unused "type: ignore" comment
pyinstrument (https://github.com/joerick/pyinstrument)
+ pyinstrument/vendor/decorator.py:66: error: Incompatible redefinition (redefinition with type "Callable[[Any], Any]", original type overloaded function)
aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/helpers.py:126: error: Incompatible redefinition (redefinition with type "Callable[[Any], bool]", original type overloaded function) [misc]
+ aiohttp/web_runner.py:171: error: Unused "type: ignore" comment
discord.py (https://github.com/Rapptz/discord.py)
+ discord/guild.py:554: error: Need type annotation for "empty_tuple"
- discord/ext/tasks/__init__.py:494: error: Incompatible types in assignment (expression has type "Tuple[]", variable has type "Tuple[Type[OSError], Type[GatewayNotFound], Type[ConnectionClosed], Type[ClientError], Type[TimeoutError]]")
+ discord/ext/tasks/__init__.py:494: error: Incompatible types in assignment (expression has type "Tuple[<nothing>, ...]", variable has type "Tuple[Type[OSError], Type[GatewayNotFound], Type[ConnectionClosed], Type[ClientError], Type[TimeoutError]]")
- discord/ext/tasks/__init__.py:564: error: Incompatible types in assignment (expression has type "FT", variable has type "None")
+ discord/ext/tasks/__init__.py:564: error: Incompatible types in assignment (expression has type "Callable[[VarArg(<nothing>), KwArg(<nothing>)], CoroutineType[Any, Any, <nothing>]]", variable has type "None")
+ discord/ext/tasks/__init__.py:565: error: Incompatible return value type (got "Callable[[VarArg(<nothing>), KwArg(<nothing>)], CoroutineType[Any, Any, <nothing>]]", expected "FT")
- discord/ext/tasks/__init__.py:592: error: Incompatible types in assignment (expression has type "FT", variable has type "None")
+ discord/ext/tasks/__init__.py:592: error: Incompatible types in assignment (expression has type "Callable[[VarArg(<nothing>), KwArg(<nothing>)], CoroutineType[Any, Any, <nothing>]]", variable has type "None")
+ discord/ext/tasks/__init__.py:593: error: Incompatible return value type (got "Callable[[VarArg(<nothing>), KwArg(<nothing>)], CoroutineType[Any, Any, <nothing>]]", expected "FT")
+ discord/ext/tasks/__init__.py:623: error: Incompatible return value type (got "Callable[..., CoroutineType[Any, Any, Any]]", expected "ET")
- discord/ext/commands/cog.py:229: error: Item "Group" of "Union[Any, Group, Command[Any, Any, Any]]" has no attribute "__cog_listener_names__"
+ discord/ext/commands/cog.py:229: error: "Callable[..., CoroutineType[Any, Any, Any]]" has no attribute "__cog_listener_names__"
- discord/ext/commands/cog.py:229: error: Item "Command[Any, Any, Any]" of "Union[Any, Group, Command[Any, Any, Any]]" has no attribute "__cog_listener_names__"
- discord/ext/commands/cog.py:232: error: Item "Group" of "Union[Any, Group, Command[Any, Any, Any]]" has no attribute "__name__"
- discord/ext/commands/cog.py:232: error: Item "Command[Any, Any, Any]" of "Union[Any, Group, Command[Any, Any, Any]]" has no attribute "__name__"
pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/computation/scope.py:327: error: Unused "type: ignore" comment
+ pandas/core/computation/scope.py:328: error: Unused "type: ignore" comment
+ pandas/io/common.py:577: error: Unused "type: ignore" comment
+ pandas/core/indexes/frozen.py:65: error: Incompatible types in assignment (expression has type "Callable[[FrozenList, Any], FrozenList]", base class "list" defined the type as overloaded function) [assignment]
+ pandas/io/pytables.py:3470: error: Unused "type: ignore" comment
- pandas/core/groupby/generic.py:686: error: Incompatible types in assignment (expression has type "List[ndarray[Any, dtype[_SCT]]]", variable has type "List[ndarray[Any, dtype[signedinteger[Any]]]]") [assignment]
+ pandas/core/reshape/merge.py:1616: error: Cannot determine type of "__add__" [has-type]
+ pandas/core/groupby/generic.py:690: error: Unused "type: ignore" comment
+ pandas/core/reshape/reshape.py:313: error: Cannot determine type of "__add__" [has-type]
+ pandas/tests/resample/test_datetime_index.py:1303: error: Unused "type: ignore" comment
+ pandas/tests/frame/indexing/test_setitem.py:268: error: Unused "type: ignore" comment
+ pandas/tests/tools/test_to_datetime.py:1088: error: Unused "type: ignore" comment
+ pandas/tests/tools/test_to_datetime.py:1092: error: Unused "type: ignore" comment
|
Sorry, something went wrong.
|
@AlexWaygood do you understand the couple new Cannot determine type of "__add__" errors in the primer? This looks like some kind of a bug to me. |
Sorry, something went wrong.
Yeah, it's a regression, caused by the fact that list.__add__ is now an overloaded function. We discussed it a bit in python/typeshed#8293 (comment) — our judgement was that the typeshed change fixed enough bugs that it was worth paying the price of the regression. But obviously the best of all worlds would be if we could find a fix for the regression on the mypy side as well :) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Source commit:
python/typeshed@5397d43
This version doesn't have Python 2 anymore.
Ref #12237
cc @hauntsaninja @sobolevn