-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed recent regression that results in a spurious type error when ac… #9264
Merged
Conversation
This file contains 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
…cessing an instance variable `self.x` if `x` has the type of a class-scoped type variable with a default value. This addresses #9246.
Diff from mypy_primer, showing the effect of this PR on open source code: steam.py (https://github.com/Gobot1234/steam.py)
- /tmp/mypy_primer/projects/steam.py/steam/abc.py:953:16 - error: Type "MessageT@Messageable | None" is not assignable to return type "MessageT@Messageable | None"
- Type "MessageT@Messageable | None" is not assignable to type "MessageT@Messageable | None"
- Type "MessageT@Messageable" is not assignable to type "MessageT@Messageable"
- Type "MessageT@Messageable" is not assignable to type "MessageT@Messageable | None"
- Type "MessageT@Messageable" is not assignable to type "MessageT@Messageable"
- "Message[UserT@Message, ChannelT@Message]*" is not assignable to "None" (reportReturnType)
- /tmp/mypy_primer/projects/steam.py/steam/chat.py:475:20 - error: Type "ChatMessageT@Chat" is not assignable to return type "ChatMessageT@Chat | None"
- Type "GroupMessage[PartialMember | GroupMember]* | ClanMessage[PartialMember | ClanMember]*" is not assignable to type "ChatMessageT@Chat | None"
- Type "ClanMessage[PartialMember | ClanMember]*" is not assignable to type "ChatMessageT@Chat | None"
- Type "ClanMessage[PartialMember | ClanMember]*" is not assignable to type "ChatMessageT@Chat"
- "ClanMessage[PartialMember | ClanMember]*" is not assignable to "None" (reportReturnType)
- /tmp/mypy_primer/projects/steam.py/steam/chat.py:783:16 - error: Type "Sequence[MemberT@ChatGroup]" is not assignable to return type "Sequence[MemberT@ChatGroup]"
- "typing.Sequence" is not assignable to "typing.Sequence"
- Type parameter "_T_co@Sequence" is covariant, but "MemberT@ChatGroup" is not a subtype of "MemberT@ChatGroup"
- Type "MemberT@ChatGroup" is not assignable to type "MemberT@ChatGroup" (reportReturnType)
- /tmp/mypy_primer/projects/steam.py/steam/id.py:462:16 - error: Type "ID[Type]" is not assignable to return type "IndividualID | None"
- Type "ID[Type]" is not assignable to type "IndividualID | None"
- "ID[Type]" is not assignable to "ID[Literal[Type.Individual]]"
- Type parameter "TypeT@ID" is covariant, but "Type" is not a subtype of "Literal[Type.Individual]"
- "Type" is not assignable to type "Literal[Type.Individual]"
- "ID[Type]" is not assignable to "None" (reportReturnType)
- /tmp/mypy_primer/projects/steam.py/steam/id.py:513:20 - error: Type "ID[Type]" is not assignable to return type "ID[Literal[Type.Individual]] | None"
- Type "ID[Type]" is not assignable to type "ID[Literal[Type.Individual]] | None"
- "ID[Type]" is not assignable to "ID[Literal[Type.Individual]]"
- Type parameter "TypeT@ID" is covariant, but "Type" is not a subtype of "Literal[Type.Individual]"
- "Type" is not assignable to type "Literal[Type.Individual]"
- "ID[Type]" is not assignable to "None" (reportReturnType)
+ /tmp/mypy_primer/projects/steam.py/steam/trade.py:440:13 - error: Type of "_update" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/steam.py/steam/trade.py:440:19 - error: Cannot access attribute "_update" for class "TradeOffer[ReceivingAssetT@TradeOffer, SendingAssetT@TradeOffer, UserT@TradeOffer]*"
+ Could not bind method "_update" because "Self@TradeOffer[ReceivingAssetT@TradeOffer, SendingAssetT@TradeOffer, UserT@TradeOffer]" is not assignable to parameter "self"
+ "TradeOffer[ReceivingAssetT@TradeOffer, SendingAssetT@TradeOffer, UserT@TradeOffer]*" is not assignable to "TradeOffer[Asset[UserT@TradeOffer], Asset[ClientUser], UserT@TradeOffer]"
+ Type parameter "ReceivingAssetT@TradeOffer" is covariant, but "ReceivingAssetT@TradeOffer" is not a subtype of "Asset[UserT@TradeOffer]"
+ "Asset[PartialUser]*" is not assignable to "Asset[UserT@TradeOffer]"
+ Type parameter "OwnerT@Asset" is covariant, but "PartialUser" is not a subtype of "UserT@TradeOffer"
+ Could not bind method "_update" because "Self@TradeOffer[ReceivingAssetT@TradeOffer, SendingAssetT@TradeOffer, UserT@TradeOffer]" is not assignable to parameter "self"
+ "TradeOffer[ReceivingAssetT@TradeOffer, SendingAssetT@TradeOffer, UserT@TradeOffer]*" is not assignable to "TradeOffer[Asset[UserT@TradeOffer], Asset[ClientUser], UserT@TradeOffer]"
+ Type parameter "ReceivingAssetT@TradeOffer" is covariant, but "ReceivingAssetT@TradeOffer" is not a subtype of "Asset[UserT@TradeOffer]" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/steam.py/steam/utils.py:151:25 - error: Argument of type "ID[Type]" cannot be assigned to parameter "id" of type "IndividualID" in function "__init__"
- "ID[Type]" is not assignable to "ID[Literal[Type.Individual]]"
- Type parameter "TypeT@ID" is covariant, but "Type" is not a subtype of "Literal[Type.Individual]"
- "Type" is not assignable to type "Literal[Type.Individual]" (reportArgumentType)
- /tmp/mypy_primer/projects/steam.py/steam/ext/commands/commands.py:230:16 - error: Type "MethodType | ((CogT@Command, Context[Any], **P@Command) -> Coro[R@Command]) | ((Context[Any], **P@Command) -> Coro[R@Command])" is not assignable to return type "((CogT@Command, Context[Any], **P@Command) -> Coro[R@Command]) | ((Context[Any], **P@Command) -> Coro[R@Command])"
- Type "MethodType | ((CogT@Command, Context[Any], **P@Command) -> Coro[R@Command]) | ((Context[Any], **P@Command) -> Coro[R@Command])" is not assignable to type "((CogT@Command, Context[Any], **P@Command) -> Coro[R@Command]) | ((Context[Any], **P@Command) -> Coro[R@Command])"
- Type "(CogT@Command, Context[Any], **P@Command) -> Coro[R@Command]" is not assignable to type "((CogT@Command, Context[Any], **P@Command) -> Coro[R@Command]) | ((Context[Any], **P@Command) -> Coro[R@Command])"
- Type "(CogT@Command, Context[Any], **P@Command) -> Coro[R@Command]" is not assignable to type "(CogT@Command, Context[Any], **P@Command) -> Coro[R@Command]"
- Function return type "Coro[R@Command]" is incompatible with type "Coro[R@Command]"
- "typing.Coroutine" is not assignable to "typing.Coroutine"
- Type "(CogT@Command, Context[Any], **P@Command) -> Coro[R@Command]" is not assignable to type "(Context[Any], **P@Command) -> Coro[R@Command]"
- Parameter 1: type "Context[Any]" is incompatible with type "CogT@Command"
- Type "Context[Any]" is not assignable to type "Cog[Bot] | Bot | None"
- ... (reportReturnType)
- /tmp/mypy_primer/projects/steam.py/steam/ext/commands/commands.py:607:29 - error: Argument of type "Command[CogT@GroupMixin, ..., Any]" cannot be assigned to parameter "object" of type "Command[CogT@GroupMixin, ..., Any]" in function "append"
- "steam.ext.commands.commands.Command" is not assignable to "steam.ext.commands.commands.Command"
- Type parameter "CogT@Command" is covariant, but "CogT@GroupMixin" is not a subtype of "CogT@GroupMixin"
- Type "CogT@GroupMixin" is not assignable to type "CogT@GroupMixin" (reportArgumentType)
- /tmp/mypy_primer/projects/steam.py/steam/ext/commands/commands.py:609:17 - error: Operator "+=" not supported for types "list[Command[CogT@GroupMixin, ..., Any]]" and "Sequence[Command[CogT@GroupMixin, ..., Any]]"
- Operator "+" not supported for types "list[Command[CogT@GroupMixin, ..., Any]]" and "Sequence[Command[CogT@GroupMixin, ..., Any]]" (reportOperatorIssue)
- /tmp/mypy_primer/projects/steam.py/steam/ext/commands/commands.py:657:16 - error: Type "Command[CogT@GroupMixin, ..., Any]" is not assignable to return type "Command[CogT@GroupMixin, ..., Any] | None"
- Type "Command[CogT@GroupMixin, ..., Any]" is not assignable to type "Command[CogT@GroupMixin, ..., Any] | None"
- "steam.ext.commands.commands.Command" is not assignable to "steam.ext.commands.commands.Command"
- Type parameter "CogT@Command" is covariant, but "CogT@GroupMixin" is not a subtype of "CogT@GroupMixin"
- Type "CogT@GroupMixin" is not assignable to type "CogT@GroupMixin"
- "Command[CogT@GroupMixin, ..., Any]" is not assignable to "None" (reportReturnType)
- /tmp/mypy_primer/projects/steam.py/steam/ext/commands/commands.py:681:20 - error: Type "Command[CogT@GroupMixin, ..., Any] | None" is not assignable to return type "Command[CogT@GroupMixin, ..., Any] | None"
- Type "Command[CogT@GroupMixin, ..., Any] | None" is not assignable to type "Command[CogT@GroupMixin, ..., Any] | None"
- Type "Command[CogT@GroupMixin, ..., Any]" is not assignable to type "Command[CogT@GroupMixin, ..., Any] | None"
- "steam.ext.commands.commands.Command" is not assignable to "steam.ext.commands.commands.Command"
- Type parameter "CogT@Command" is covariant, but "CogT@GroupMixin" is not a subtype of "CogT@GroupMixin"
- Type "CogT@GroupMixin" is not assignable to type "CogT@GroupMixin"
- "Command[CogT@GroupMixin, ..., Any]" is not assignable to "None" (reportReturnType)
- /tmp/mypy_primer/projects/steam.py/steam/ext/commands/commands.py:689:16 - error: Type "Group[CogT@GroupMixin, ..., Any] | Command[CogT@GroupMixin, ..., Any] | Unknown" is not assignable to return type "Command[CogT@GroupMixin, ..., Any] | None"
- Type "Group[CogT@GroupMixin, ..., Any] | Command[CogT@GroupMixin, ..., Any] | Unknown" is not assignable to type "Command[CogT@GroupMixin, ..., Any] | None"
- Type "Command[CogT@GroupMixin, ..., Any]" is not assignable to type "Command[CogT@GroupMixin, ..., Any] | None"
- "steam.ext.commands.commands.Command" is not assignable to "steam.ext.commands.commands.Command"
- Type parameter "CogT@Command" is covariant, but "CogT@GroupMixin" is not a subtype of "CogT@GroupMixin"
- Type "CogT@GroupMixin" is not assignable to type "CogT@GroupMixin"
- "Command[CogT@GroupMixin, ..., Any]" is not assignable to "None" (reportReturnType)
- /tmp/mypy_primer/projects/steam.py/steam/ext/commands/commands.py:732:41 - warning: Unnecessary "# type: ignore" comment (reportUnnecessaryTypeIgnoreComment)
... (truncated 2 lines) ...
psycopg (https://github.com/psycopg/psycopg)
- /tmp/mypy_primer/projects/psycopg/psycopg/psycopg/connection.py:249:20 - error: Type "Cursor[Row@Connection]" is not assignable to return type "Cursor[Row@Connection]"
- "psycopg.psycopg.cursor.Cursor" is not assignable to "psycopg.psycopg.cursor.Cursor"
- Type parameter "Row@Cursor" is covariant, but "Row@Connection" is not a subtype of "Row@Connection"
- Type "Row@Connection" is not assignable to type "Row@Connection" (reportReturnType)
- /tmp/mypy_primer/projects/psycopg/psycopg/psycopg/cursor.py
- /tmp/mypy_primer/projects/psycopg/psycopg/psycopg/cursor.py:69:16 - error: Type "RowFactory[Row@Cursor] | RowFactory[Any]" is not assignable to return type "RowFactory[Row@Cursor]"
- Type "RowFactory[Row@Cursor] | RowFactory[Any]" is not assignable to type "RowFactory[Row@Cursor]"
- "psycopg.psycopg.rows.RowFactory" is not assignable to "psycopg.psycopg.rows.RowFactory"
- Type parameter "Row@RowFactory" is covariant, but "Row@Cursor" is not a subtype of "Row@Cursor"
- Type "Row@Cursor" is not assignable to type "Row@Cursor" (reportReturnType)
- /tmp/mypy_primer/projects/psycopg/psycopg/psycopg/cursor.py:78:16 - error: Type "RowMaker[Row@Cursor] | RowMaker[Any]" is not assignable to return type "RowMaker[Row@Cursor]"
- Type "RowMaker[Row@Cursor] | RowMaker[Any]" is not assignable to type "RowMaker[Row@Cursor]"
- "psycopg.psycopg.rows.RowMaker" is not assignable to "psycopg.psycopg.rows.RowMaker"
- Type parameter "Row@RowMaker" is covariant, but "Row@Cursor" is not a subtype of "Row@Cursor"
- Type "Row@Cursor" is not assignable to type "Row@Cursor" (reportReturnType)
- /tmp/mypy_primer/projects/psycopg/psycopg/psycopg/cursor_async.py
- /tmp/mypy_primer/projects/psycopg/psycopg/psycopg/cursor_async.py:69:16 - error: Type "AsyncRowFactory[Row@AsyncCursor] | AsyncRowFactory[Any]" is not assignable to return type "AsyncRowFactory[Row@AsyncCursor]"
- Type "AsyncRowFactory[Row@AsyncCursor] | AsyncRowFactory[Any]" is not assignable to type "AsyncRowFactory[Row@AsyncCursor]"
- "psycopg.psycopg.rows.AsyncRowFactory" is not assignable to "psycopg.psycopg.rows.AsyncRowFactory"
- Type parameter "Row@AsyncRowFactory" is covariant, but "Row@AsyncCursor" is not a subtype of "Row@AsyncCursor"
- Type "Row@AsyncCursor" is not assignable to type "Row@AsyncCursor" (reportReturnType)
- /tmp/mypy_primer/projects/psycopg/psycopg/psycopg/cursor_async.py:78:16 - error: Type "RowMaker[Row@AsyncCursor] | RowMaker[Any]" is not assignable to return type "RowMaker[Row@AsyncCursor]"
- Type "RowMaker[Row@AsyncCursor] | RowMaker[Any]" is not assignable to type "RowMaker[Row@AsyncCursor]"
- "psycopg.psycopg.rows.RowMaker" is not assignable to "psycopg.psycopg.rows.RowMaker"
- Type parameter "Row@RowMaker" is covariant, but "Row@AsyncCursor" is not a subtype of "Row@AsyncCursor"
- Type "Row@AsyncCursor" is not assignable to type "Row@AsyncCursor" (reportReturnType)
+ /tmp/mypy_primer/projects/psycopg/psycopg/psycopg/server_cursor.py:249:13 - error: Argument of type "Self@ServerCursor[Row@ServerCursor]" cannot be assigned to parameter "self" of type "Cursor[TupleRow]" in function "__init__"
+ "ServerCursor[Row@ServerCursor]*" is not assignable to "Cursor[TupleRow]"
+ Type parameter "Row@Cursor" is covariant, but "Row@ServerCursor" is not a subtype of "TupleRow"
+ "object*" is not assignable to "Tuple[Any, ...]" (reportArgumentType)
+ /tmp/mypy_primer/projects/psycopg/psycopg/psycopg/server_cursor.py:251:36 - error: Argument of type "Self@ServerCursor[Row@ServerCursor]" cannot be assigned to parameter "self" of type "ServerCursorMixin[Unknown, TupleRow]" in function "__init__"
+ "ServerCursor[Row@ServerCursor]*" is not assignable to "ServerCursorMixin[Unknown, TupleRow]"
+ Type parameter "Row@ServerCursorMixin" is covariant, but "Row@ServerCursor" is not a subtype of "TupleRow"
+ "object*" is not assignable to "Tuple[Any, ...]" (reportArgumentType)
+ /tmp/mypy_primer/projects/psycopg/psycopg/psycopg/server_cursor.py:388:13 - error: Argument of type "Self@AsyncServerCursor[Row@AsyncServerCursor]" cannot be assigned to parameter "self" of type "AsyncCursor[TupleRow]" in function "__init__"
+ "AsyncServerCursor[Row@AsyncServerCursor]*" is not assignable to "AsyncCursor[TupleRow]"
+ Type parameter "Row@AsyncCursor" is covariant, but "Row@AsyncServerCursor" is not a subtype of "TupleRow"
+ "object*" is not assignable to "Tuple[Any, ...]" (reportArgumentType)
+ /tmp/mypy_primer/projects/psycopg/psycopg/psycopg/server_cursor.py:390:36 - error: Argument of type "Self@AsyncServerCursor[Row@AsyncServerCursor]" cannot be assigned to parameter "self" of type "ServerCursorMixin[Unknown, TupleRow]" in function "__init__"
+ "AsyncServerCursor[Row@AsyncServerCursor]*" is not assignable to "ServerCursorMixin[Unknown, TupleRow]"
+ Type parameter "Row@ServerCursorMixin" is covariant, but "Row@AsyncServerCursor" is not a subtype of "TupleRow"
+ "object*" is not assignable to "Tuple[Any, ...]" (reportArgumentType)
- /tmp/mypy_primer/projects/psycopg/psycopg_pool/psycopg_pool/pool.py:171:23 - error: Return type of generator function must be compatible with "Generator[CT@ConnectionPool, Any, Any]"
- Type "CT@ConnectionPool" is not assignable to type "CT@ConnectionPool" (reportReturnType)
- /tmp/mypy_primer/projects/psycopg/psycopg_pool/psycopg_pool/pool.py:216:24 - error: Type "CT@ConnectionPool" is not assignable to return type "CT@ConnectionPool"
- Type "CT@ConnectionPool" is not assignable to type "CT@ConnectionPool" (reportReturnType)
- /tmp/mypy_primer/projects/psycopg/psycopg_pool/psycopg_pool/pool.py:262:16 - error: Type "CT@ConnectionPool" is not assignable to return type "CT@ConnectionPool"
- Type "CT@ConnectionPool" is not assignable to type "CT@ConnectionPool" (reportReturnType)
- /tmp/mypy_primer/projects/psycopg/psycopg_pool/psycopg_pool/pool.py:851:20 - error: Type "CT@WaitingClient" is not assignable to return type "CT@WaitingClient"
- Type "CT@WaitingClient" is not assignable to type "CT@WaitingClient" (reportReturnType)
- /tmp/mypy_primer/projects/psycopg/psycopg_pool/psycopg_pool/pool_async.py:194:23 - error: Return type of async generator function must be compatible with "AsyncGenerator[ACT@AsyncConnectionPool, Any]"
- Type "ACT@AsyncConnectionPool" is not assignable to type "ACT@AsyncConnectionPool" (reportReturnType)
- /tmp/mypy_primer/projects/psycopg/psycopg_pool/psycopg_pool/pool_async.py:240:24 - error: Type "ACT@AsyncConnectionPool" is not assignable to return type "ACT@AsyncConnectionPool"
- Type "ACT@AsyncConnectionPool" is not assignable to type "ACT@AsyncConnectionPool" (reportReturnType)
- /tmp/mypy_primer/projects/psycopg/psycopg_pool/psycopg_pool/pool_async.py:286:16 - error: Type "ACT@AsyncConnectionPool" is not assignable to return type "ACT@AsyncConnectionPool"
- Type "ACT@AsyncConnectionPool" is not assignable to type "ACT@AsyncConnectionPool" (reportReturnType)
- /tmp/mypy_primer/projects/psycopg/psycopg_pool/psycopg_pool/pool_async.py:908:20 - error: Type "ACT@WaitingClient" is not assignable to return type "ACT@WaitingClient"
- Type "ACT@WaitingClient" is not assignable to type "ACT@WaitingClient" (reportReturnType)
- 1855 errors, 106 warnings, 0 informations
+ 1846 errors, 106 warnings, 0 informations
trio (https://github.com/python-trio/trio)
- /tmp/mypy_primer/projects/trio/src/trio/_core/_tests/test_run.py:130:22 - error: Argument type is partially unknown
- Argument corresponds to parameter "exception" in function "__init__"
- Argument type is "Matcher[Unknown]" (reportUnknownArgumentType)
- /tmp/mypy_primer/projects/trio/src/trio/_core/_tests/test_run.py:141:22 - error: Argument type is partially unknown
- Argument corresponds to parameter "exception" in function "__init__"
- Argument type is "Matcher[Unknown]" (reportUnknownArgumentType)
- /tmp/mypy_primer/projects/trio/src/trio/_tests/test_highlevel_serve_listeners.py:123:26 - error: Argument type is partially unknown
- Argument corresponds to parameter "exception" in function "__init__"
- Argument type is "Matcher[Unknown]" (reportUnknownArgumentType)
- /tmp/mypy_primer/projects/trio/src/trio/_tests/test_testing_raisesgroup.py:127:9 - error: Argument type is partially unknown
- Argument corresponds to parameter "exception" in function "__init__"
- Argument type is "Matcher[Unknown]" (reportUnknownArgumentType)
- /tmp/mypy_primer/projects/trio/src/trio/_tests/test_testing_raisesgroup.py:336:22 - error: Argument type is partially unknown
- Argument corresponds to parameter "exception" in function "__init__"
- Argument type is "Matcher[Unknown]" (reportUnknownArgumentType)
- 3935 errors, 53 warnings, 0 informations
+ 3930 errors, 53 warnings, 0 informations
core (https://github.com/home-assistant/core)
- /tmp/mypy_primer/projects/core/homeassistant/data_entry_flow.py:261:16 - error: Type "_FlowResultT@FlowManager" is not assignable to return type "_FlowResultT@FlowManager"
- Type "_FlowResultT@FlowManager" is not assignable to type "_FlowResultT@FlowManager" (reportReturnType)
- /tmp/mypy_primer/projects/core/homeassistant/data_entry_flow.py:295:16 - error: Type "list[_FlowResultT@FlowManager]" is not assignable to return type "list[_FlowResultT@FlowManager]"
- "builtins.list" is not assignable to "builtins.list"
- Type parameter "_T@list" is invariant, but "_FlowResultT@FlowManager" is not the same as "_FlowResultT@FlowManager"
- Consider switching from "list" to "Sequence" which is covariant (reportReturnType)
- /tmp/mypy_primer/projects/core/homeassistant/data_entry_flow.py:316:16 - error: Type "list[FlowHandler[_FlowContextT@FlowManager, _FlowResultT@FlowManager, _HandlerT@FlowManager]]" is not assignable to return type "list[FlowHandler[_FlowContextT@FlowManager, _FlowResultT@FlowManager, _HandlerT@FlowManager]]" (reportReturnType)
- /tmp/mypy_primer/projects/core/homeassistant/data_entry_flow.py:347:16 - error: Type "_FlowResultT@FlowManager" is not assignable to return type "_FlowResultT@FlowManager"
- Type "_FlowResultT@FlowManager" is not assignable to type "_FlowResultT@FlowManager" (reportReturnType)
- /tmp/mypy_primer/projects/core/homeassistant/data_entry_flow.py:371:16 - error: Type "_FlowResultT@FlowManager" is not assignable to return type "_FlowResultT@FlowManager"
- Type "_FlowResultT@FlowManager" is not assignable to type "_FlowResultT@FlowManager" (reportReturnType)
- /tmp/mypy_primer/projects/core/homeassistant/data_entry_flow.py:462:16 - error: Type "_FlowResultT@FlowManager" is not assignable to return type "_FlowResultT@FlowManager"
- Type "_FlowResultT@FlowManager" is not assignable to type "_FlowResultT@FlowManager" (reportReturnType)
- /tmp/mypy_primer/projects/core/homeassistant/components/ring/number.py:127:57 - error: Argument of type "RingDeviceT@RingNumber" cannot be assigned to parameter of type "RingDeviceT@RingNumber"
- Type "RingDeviceT@RingNumber" is not assignable to type "RingDeviceT@RingNumber" (reportArgumentType)
- /tmp/mypy_primer/projects/core/homeassistant/components/ring/number.py:147:49 - error: Argument of type "RingDeviceT@RingNumber" cannot be assigned to parameter of type "RingDeviceT@RingNumber"
- Type "RingDeviceT@RingNumber" is not assignable to type "RingDeviceT@RingNumber" (reportArgumentType)
- /tmp/mypy_primer/projects/core/homeassistant/components/ring/sensor.py:88:68 - error: Argument of type "RingDeviceT@RingSensor" cannot be assigned to parameter of type "RingDeviceT@RingSensor"
- Type "RingDeviceT@RingSensor" is not assignable to type "RingDeviceT@RingSensor" (reportArgumentType)
- /tmp/mypy_primer/projects/core/homeassistant/components/ring/siren.py:120:53 - error: Argument of type "RingDeviceT@RingSiren" cannot be assigned to parameter of type "RingDeviceT@RingSiren"
- Type "RingDeviceT@RingSiren" is not assignable to type "RingDeviceT@RingSiren" (reportArgumentType)
- /tmp/mypy_primer/projects/core/homeassistant/components/ring/siren.py:133:54 - error: Argument of type "RingDeviceT@RingSiren" cannot be assigned to parameter of type "RingDeviceT@RingSiren"
- Type "RingDeviceT@RingSiren" is not assignable to type "RingDeviceT@RingSiren" (reportArgumentType)
- /tmp/mypy_primer/projects/core/homeassistant/components/ring/siren.py:135:55 - error: Argument of type "RingDeviceT@RingSiren" cannot be assigned to parameter of type "RingDeviceT@RingSiren"
- Type "RingDeviceT@RingSiren" is not assignable to type "RingDeviceT@RingSiren" (reportArgumentType)
- /tmp/mypy_primer/projects/core/homeassistant/components/ring/switch.py:137:54 - error: Argument of type "RingDeviceT@RingSwitch" cannot be assigned to parameter of type "RingDeviceT@RingSwitch"
- Type "RingDeviceT@RingSwitch" is not assignable to type "RingDeviceT@RingSwitch" (reportArgumentType)
- /tmp/mypy_primer/projects/core/homeassistant/components/ring/switch.py:139:55 - error: Argument of type "RingDeviceT@RingSwitch" cannot be assigned to parameter of type "RingDeviceT@RingSwitch"
- Type "RingDeviceT@RingSwitch" is not assignable to type "RingDeviceT@RingSwitch" (reportArgumentType)
- /tmp/mypy_primer/projects/core/homeassistant/helpers/entity_component.py:218:16 - error: Type "list[_EntityT@EntityComponent]" is not assignable to return type "list[_EntityT@EntityComponent]"
- "builtins.list" is not assignable to "builtins.list"
- Type parameter "_T@list" is invariant, but "_EntityT@EntityComponent" is not the same as "_EntityT@EntityComponent"
- Consider switching from "list" to "Sequence" which is covariant (reportReturnType)
- 22341 errors, 321 warnings, 0 informations
+ 22326 errors, 321 warnings, 0 informations
|
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.
…cessing an instance variable
self.x
ifx
has the type of a class-scoped type variable with a default value. This addresses #9246.