-
Notifications
You must be signed in to change notification settings - Fork 28
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
Merge 1.1.388 #851
Merged
Merged
Merge 1.1.388 #851
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
…within a generic function and uses type parameters from that function. This addresses #9359. (#9360)
Co-authored-by: Rich Chiodo <rchiodo@microsoft.com>
…he case where the function has a `**kwargs` parameter typed with an unpacked TypedDict. This addresses #9181. (#9365)
…ertain cases involving arguments with lambda expressions. This addresses #8697. (#9367)
…hods on a closed TypedDict to provide a more precise (narrower) type for the key values.
…ar definition. This partially addresses #9353. (#9377)
…involving classes parameterized with a contravariant type variable. This addresses #9054. (#9379)
…igned in an `__init_subclass__` or `__class_getitem__` method. These methods are implicitly class methods even though they are not decorated with `@classmethod`. This addresses microsoft/pylance-release#2781. (#9381)
…is empty and the class is marked `@final`. This addresses #9387. (#9389)
…aclass_transform` field. This isn't an illegal condition, so the resulting error was a false positive. Instead, changed completion provider to not suggest the illegal identifier as a valid keyword argument. This addresses #9386, #9220, #9278. (#9390)
# Conflicts: # lerna.json # packages/pyright-internal/package-lock.json # packages/pyright-internal/src/localization/package.nls.ru.json # packages/pyright-internal/src/localization/package.nls.zh-cn.json # packages/pyright-internal/src/tests/samples/dataclassTransform3.py # packages/pyright/package-lock.json # packages/pyright/package.json # packages/vscode-pyright/package-lock.json # packages/vscode-pyright/package.json
…s now that the same change was made upstream
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/chat.py:422:25 - error: Argument of type "ClanMessage[PartialMember | ClanMember]* | GroupMessage[PartialMember | GroupMember]*" cannot be assigned to parameter "message" of type "Message[PartialUser, Channel[Message[UserT@Message, ChannelT@Message], Clan | None, Group | None]]" in function "__init__"
- Type "ClanMessage[PartialMember | ClanMember]* | GroupMessage[PartialMember | GroupMember]*" is not assignable to type "Message[PartialUser, Channel[Message[UserT@Message, ChannelT@Message], Clan | None, Group | None]]"
- "ClanMessage[PartialMember | ClanMember]*" is not assignable to "Message[PartialUser, Channel[Message[UserT@Message, ChannelT@Message], Clan | None, Group | None]]"
- Type parameter "ChannelT@Message" is covariant, but "ClanMember" is not a subtype of "Channel[Message[UserT@Message, ChannelT@Message], Clan | None, Group | None]"
- "ClanMember" is not assignable to "Channel[Message[UserT@Message, ChannelT@Message], Clan | None, Group | None]" (reportArgumentType)
- /tmp/mypy_primer/projects/steam.py/steam/message.py:87:68 - error: Too many type arguments provided for "ChatMessage"; expected 2 but received 3 (reportInvalidTypeArguments)
- /tmp/mypy_primer/projects/steam.py/steam/message.py:96:33 - error: Argument of type "GroupChannel" cannot be assigned to parameter "channel" of type "GroupMember" in function "__init__"
- "GroupChannel" is not assignable to "GroupMember" (reportArgumentType)
- /tmp/mypy_primer/projects/steam.py/steam/message.py:104:65 - error: Too many type arguments provided for "ChatMessage"; expected 2 but received 3 (reportInvalidTypeArguments)
- /tmp/mypy_primer/projects/steam.py/steam/message.py:113:33 - error: Argument of type "ClanChannel" cannot be assigned to parameter "channel" of type "ClanMember" in function "__init__"
- "ClanChannel" is not assignable to "ClanMember" (reportArgumentType)
- /tmp/mypy_primer/projects/steam.py/steam/state.py:1482:31 - error: Argument of type "ClanMessage[GroupMember | PartialMember | ClanMember] | GroupMessage[PartialMember | GroupMember]" cannot be assigned to parameter "x" of type "Message[PartialUser, Channel[Message[UserT@Message, ChannelT@Message], Clan | None, Group | None]]" in function "append"
- Type "ClanMessage[GroupMember | PartialMember | ClanMember] | GroupMessage[PartialMember | GroupMember]" is not assignable to type "Message[PartialUser, Channel[Message[UserT@Message, ChannelT@Message], Clan | None, Group | None]]"
- "ClanMessage[GroupMember | PartialMember | ClanMember]" is not assignable to "Message[PartialUser, Channel[Message[UserT@Message, ChannelT@Message], Clan | None, Group | None]]"
- Type parameter "ChannelT@Message" is covariant, but "ClanMember" is not a subtype of "Channel[Message[UserT@Message, ChannelT@Message], Clan | None, Group | None]"
- "ClanMember" is not assignable to "Channel[Message[UserT@Message, ChannelT@Message], Clan | None, Group | None]" (reportArgumentType)
- /tmp/mypy_primer/projects/steam.py/steam/state.py:1521:31 - error: Argument of type "ClanMessage[GroupMember | ClanMember] | GroupMessage[PartialMember | GroupMember]" cannot be assigned to parameter "x" of type "Message[PartialUser, Channel[Message[UserT@Message, ChannelT@Message], Clan | None, Group | None]]" in function "append"
- Type "ClanMessage[GroupMember | ClanMember] | GroupMessage[PartialMember | GroupMember]" is not assignable to type "Message[PartialUser, Channel[Message[UserT@Message, ChannelT@Message], Clan | None, Group | None]]"
- "ClanMessage[GroupMember | ClanMember]" is not assignable to "Message[PartialUser, Channel[Message[UserT@Message, ChannelT@Message], Clan | None, Group | None]]"
- Type parameter "ChannelT@Message" is covariant, but "ClanMember" is not a subtype of "Channel[Message[UserT@Message, ChannelT@Message], Clan | None, Group | None]"
- "ClanMember" is not assignable to "Channel[Message[UserT@Message, ChannelT@Message], Clan | None, Group | None]" (reportArgumentType)
- /tmp/mypy_primer/projects/steam.py/steam/state.py:1578:21 - error: Type of "_location" is unknown (reportUnknownMemberType)
- /tmp/mypy_primer/projects/steam.py/steam/state.py:1578:37 - error: Cannot access attribute "_location" for class "ClanMember"
- Attribute "_location" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/steam.py/steam/state.py:1578:37 - error: Cannot access attribute "_location" for class "GroupMember"
- Attribute "_location" is unknown (reportAttributeAccessIssue)
- Type of "message" is "ChatMessage[Unknown, Unknown]" (reportUnknownMemberType)
+ Type of "message" is "ChatMessage[Unknown, Unknown, Unknown]" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/steam.py/tests/unit/mocks.py:69:7 - error: Base classes of MockClanMessage are mutually incompatible
- Base class "ClanMessage[PartialMember | ClanMember]" derives from "Message[PartialMember | ClanMember, ClanMember]" which is incompatible with type "Message[PartialUser, Channel[Message[UserT@Message, ChannelT@Message], Clan | None, Group | None]]" (reportGeneralTypeIssues)
- /tmp/mypy_primer/projects/steam.py/tests/unit/mocks.py:73:7 - error: Base classes of MockGroupMessage are mutually incompatible
- Base class "GroupMessage[PartialMember | GroupMember]" derives from "Message[PartialMember | GroupMember, GroupMember]" which is incompatible with type "Message[PartialUser, Channel[Message[UserT@Message, ChannelT@Message], Clan | None, Group | None]]" (reportGeneralTypeIssues)
- 8487 errors, 97 warnings, 0 notes
+ 8475 errors, 97 warnings, 0 notes
ibis (https://github.com/ibis-project/ibis)
- /tmp/mypy_primer/projects/ibis/ibis/common/tests/test_grounds.py:1072:17 - error: Cannot assign to attribute "kwargs" for class "type[Test]*"
- Attribute "kwargs" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/ibis/ibis/common/tests/test_grounds.py:1072:17 - error: Instance variable "kwargs" is not initialized in the class body or __init__ method (reportUninitializedInstanceVariable)
- /tmp/mypy_primer/projects/ibis/ibis/common/tests/test_grounds.py:1077:12 - warning: Type of "kwargs" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/ibis/ibis/common/tests/test_grounds.py:1077:12 - warning: Type of "kwargs" is partially unknown
+ Type of "kwargs" is "dict[str, Unknown]" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/ibis/ibis/common/tests/test_grounds.py:1077:18 - error: Cannot access attribute "kwargs" for class "type[Test2]"
- Attribute "kwargs" is unknown (reportAttributeAccessIssue)
- 8215 errors, 107113 warnings, 0 notes
+ 8212 errors, 107113 warnings, 0 notes
sympy (https://github.com/sympy/sympy)
- Type of "P" is "(condition: Unknown, given_condition: Unknown | None = None, numsamples: Unknown | None = None, evaluate: bool = True, **kwargs: Unknown) -> (Unknown | Any | BernoulliDistribution | Probability | Self@Expr | tuple[Unknown, ...] | Sum | Order | Piecewise | Basic | Equality | Lambda | Relational | Unequality | int | None)" (reportUnknownVariableType)
+ Type of "P" is "(condition: Unknown, given_condition: Unknown | None = None, numsamples: Unknown | None = None, evaluate: bool = True, **kwargs: Unknown) -> (Unknown | Any | BernoulliDistribution | Probability | Self@Expr | tuple[Unknown, ...] | Sum | Order | Piecewise | Basic | Equality | Lambda | int | None)" (reportUnknownVariableType)
- Type of "E" is "(expr: Unknown, condition: Unknown | None = None, numsamples: Unknown | None = None, evaluate: bool = True, **kwargs: Unknown) -> (Unknown | Basic | Expectation | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Piecewise | Equality | Relational | Unequality | Integral | ExpectationMatrix | Literal[0] | None)" (reportUnknownVariableType)
+ Type of "E" is "(expr: Unknown, condition: Unknown | None = None, numsamples: Unknown | None = None, evaluate: bool = True, **kwargs: Unknown) -> (Unknown | Basic | Expectation | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Piecewise | Equality | Integral | ExpectationMatrix | Literal[0] | None)" (reportUnknownVariableType)
- Type of "H" is "(expr: Unknown, condition: Unknown | None = None, **kwargs: Unknown) -> (int | Expr | Basic | Expectation | Unknown | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Piecewise | Equality | Relational | Unequality | Integral | ExpectationMatrix | None)" (reportUnknownVariableType)
+ Type of "H" is "(expr: Unknown, condition: Unknown | None = None, **kwargs: Unknown) -> (int | Expr | Basic | Expectation | Unknown | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Piecewise | Equality | Integral | ExpectationMatrix | None)" (reportUnknownVariableType)
- Type of "covariance" is "(X: Unknown, Y: Unknown, condition: Unknown | None = None, **kwargs: Unknown) -> (CrossCovarianceMatrix | Covariance | Unknown | Basic | Expectation | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Piecewise | Equality | Relational | Unequality | Integral | ExpectationMatrix | Literal[0] | None)" (reportUnknownVariableType)
+ Type of "covariance" is "(X: Unknown, Y: Unknown, condition: Unknown | None = None, **kwargs: Unknown) -> (CrossCovarianceMatrix | Covariance | Unknown | Basic | Expectation | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Piecewise | Equality | Integral | ExpectationMatrix | Literal[0] | None)" (reportUnknownVariableType)
- Type of "entropy" is "(expr: Unknown, condition: Unknown | None = None, **kwargs: Unknown) -> (int | Expr | Basic | Expectation | Unknown | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Piecewise | Equality | Relational | Unequality | Integral | ExpectationMatrix | None)" (reportUnknownVariableType)
+ Type of "entropy" is "(expr: Unknown, condition: Unknown | None = None, **kwargs: Unknown) -> (int | Expr | Basic | Expectation | Unknown | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Piecewise | Equality | Integral | ExpectationMatrix | None)" (reportUnknownVariableType)
- Type of "factorial_moment" is "(X: Unknown, n: Unknown, condition: Unknown | None = None, **kwargs: Unknown) -> (Expr | Basic | Expectation | Unknown | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Piecewise | Equality | Relational | Unequality | Integral | ExpectationMatrix | Literal[0] | None)" (reportUnknownVariableType)
+ Type of "factorial_moment" is "(X: Unknown, n: Unknown, condition: Unknown | None = None, **kwargs: Unknown) -> (Expr | Basic | Expectation | Unknown | tuple[Unknown, ...] | Sum | Self@Expr | Order | Any | Piecewise | Equality | Integral | ExpectationMatrix | Literal[0] | None)" (reportUnknownVariableType)
- /tmp/mypy_primer/projects/sympy/sympy/stats/compound_rv.py:107:9 - warning: Return type, "tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Any | Piecewise | Basic | Equality | Relational | Unequality | Integral | Literal[0] | None", is partially unknown (reportUnknownParameterType)
+ /tmp/mypy_primer/projects/sympy/sympy/stats/compound_rv.py:107:9 - warning: Return type, "tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Any | Piecewise | Basic | Equality | Integral | Literal[0] | None", is partially unknown (reportUnknownParameterType)
- Type of "compute_expectation" is "(expr: Unknown, rvs: Unknown | None = None, **kwargs: Unknown) -> (tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Any | Piecewise | Basic | Equality | Relational | Unequality | Literal[0] | None)" (reportUnknownMemberType)
+ Type of "compute_expectation" is "(expr: Unknown, rvs: Unknown | None = None, **kwargs: Unknown) -> (tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Any | Piecewise | Basic | Equality | Literal[0] | None)" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/stats/compound_rv.py:113:20 - warning: Return type, "tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Any | Piecewise | Basic | Equality | Relational | Unequality | Literal[0] | None", is partially unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/stats/compound_rv.py:113:20 - warning: Return type, "tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Any | Piecewise | Basic | Equality | Literal[0] | None", is partially unknown (reportUnknownVariableType)
- Type of "compute_expectation" is "((expr: Unknown, rvs: Unknown | None = None, evaluate: bool = False, **kwargs: Unknown) -> (Unknown | Equality | Relational | Unequality | Integral)) | ((expr: Unknown, rvs: Unknown | None = None, evaluate: bool = True, **kwargs: Unknown) -> (Unknown | Equality | Relational | Unequality | Sum))" (reportUnknownMemberType)
+ Type of "compute_expectation" is "((expr: Unknown, rvs: Unknown | None = None, evaluate: bool = False, **kwargs: Unknown) -> (Unknown | Equality | Integral)) | ((expr: Unknown, rvs: Unknown | None = None, evaluate: bool = True, **kwargs: Unknown) -> (Unknown | Equality | Sum))" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/stats/compound_rv.py:114:16 - warning: Return type, "Unknown | Equality | Relational | Unequality | Integral | Sum", is partially unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/stats/compound_rv.py:114:16 - warning: Return type, "Unknown | Equality | Integral | Sum", is partially unknown (reportUnknownVariableType)
- /tmp/mypy_primer/projects/sympy/sympy/stats/compound_rv.py:116:9 - warning: Return type, "Unknown | Probability | Self@Expr | tuple[Unknown, ...] | Sum | Order | Any | Piecewise | Basic | Equality | Relational | Unequality | int", is partially unknown (reportUnknownParameterType)
+ /tmp/mypy_primer/projects/sympy/sympy/stats/compound_rv.py:116:9 - warning: Return type, "Unknown | Probability | Self@Expr | tuple[Unknown, ...] | Sum | Order | Any | Piecewise | Basic | Equality | int", is partially unknown (reportUnknownParameterType)
- Type of "probability" is "((condition: Unknown, **kwargs: Unknown) -> Unknown) | ((condition: Unknown) -> (Unknown | Probability | Self@Expr | tuple[Unknown, ...] | Sum | Order | Any | Piecewise | Basic | Equality | Relational | Unequality | int)) | ((condition: Unknown) -> (Unknown | Piecewise | Literal[0]))" (reportUnknownMemberType)
+ Type of "probability" is "((condition: Unknown, **kwargs: Unknown) -> Unknown) | ((condition: Unknown) -> (Unknown | Probability | Self@Expr | tuple[Unknown, ...] | Sum | Order | Any | Piecewise | Basic | Equality | int)) | ((condition: Unknown) -> (Unknown | Piecewise | Literal[0]))" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/stats/compound_rv.py:119:16 - warning: Return type, "Unknown | Probability | Self@Expr | tuple[Unknown, ...] | Sum | Order | Any | Piecewise | Basic | Equality | Relational | Unequality | int", is partially unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/stats/compound_rv.py:119:16 - warning: Return type, "Unknown | Probability | Self@Expr | tuple[Unknown, ...] | Sum | Order | Any | Piecewise | Basic | Equality | int", is partially unknown (reportUnknownVariableType)
- Type of "expr" is "tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Any | Piecewise | Basic | Equality | Relational | Unequality | Integral | None" (reportUnknownVariableType)
+ Type of "expr" is "tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Any | Piecewise | Basic | Equality | Integral | None" (reportUnknownVariableType)
- Type of "_marginalise" is "(expr: Unknown, rv: Unknown, evaluate: Unknown) -> (tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Any | Piecewise | Basic | Equality | Relational | Unequality | Integral | None)" (reportUnknownMemberType)
+ Type of "_marginalise" is "(expr: Unknown, rv: Unknown, evaluate: Unknown) -> (tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Any | Piecewise | Basic | Equality | Integral | None)" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/stats/compound_rv.py:197:9 - warning: Return type, "tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Any | Piecewise | Basic | Equality | Relational | Unequality | Integral | None", is partially unknown (reportUnknownParameterType)
+ /tmp/mypy_primer/projects/sympy/sympy/stats/compound_rv.py:197:9 - warning: Return type, "tuple[Unknown, ...] | Unknown | Sum | Self@Expr | Order | Any | Piecewise | Basic | Equality | Integral | None", is partially unknown (reportUnknownParameterType)
- Type of "expr" is "Equality | Unknown | Relational | Unequality | Sum" (reportUnknownVariableType)
... (truncated 2031 lines) ...
scikit-learn (https://github.com/scikit-learn/scikit-learn)
- /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_set_output.py:371:17 - error: Cannot assign to attribute "_sklearn_auto_wrap_output_keys" for class "type[_SetOutputMixin]*"
- Attribute "_sklearn_auto_wrap_output_keys" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_set_output.py:371:17 - error: Instance variable "_sklearn_auto_wrap_output_keys" is not initialized in the class body or __init__ method (reportUninitializedInstanceVariable)
- /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_set_output.py:379:13 - error: Cannot assign to attribute "_sklearn_auto_wrap_output_keys" for class "type[_SetOutputMixin]*"
- Attribute "_sklearn_auto_wrap_output_keys" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/_set_output.py:384:17 - error: Cannot access attribute "_sklearn_auto_wrap_output_keys" for class "type[_SetOutputMixin]*"
- Attribute "_sklearn_auto_wrap_output_keys" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/tests/test_set_output.py:313:13 - error: Cannot assign to attribute "custom_parameter" for class "type[AnotherMixin]*"
- Attribute "custom_parameter" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/scikit-learn/sklearn/utils/tests/test_set_output.py:313:13 - error: Instance variable "custom_parameter" is not initialized in the class body or __init__ method (reportUninitializedInstanceVariable)
- 16722 errors, 196634 warnings, 0 notes
+ 16716 errors, 196634 warnings, 0 notes
black (https://github.com/psf/black): 9.99x slower (1.9s -> 19.3s in a single noisy sample)
core (https://github.com/home-assistant/core)
- /tmp/mypy_primer/projects/core/homeassistant/components/unifi/button.py:85:63 - error: Too many type arguments provided for "UnifiEntityDescription"; expected 1 but received 2 (reportInvalidTypeArguments)
- Type of "register_platform" is "(async_add_entities: AddEntitiesCallback, entity_class: type[UnifiEntity[Unknown]], descriptions: tuple[UnifiEntityDescription[Unknown], ...], requires_admin: bool = False) -> None" (reportUnknownMemberType)
+ Type of "register_platform" is "(async_add_entities: AddEntitiesCallback, entity_class: type[UnifiEntity[Unknown, Unknown]], descriptions: tuple[UnifiEntityDescription[Unknown, Unknown], ...], requires_admin: bool = False) -> None" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/core/homeassistant/components/unifi/button.py:146:47 - error: Too many type arguments provided for "UnifiEntity"; expected 1 but received 2 (reportInvalidTypeArguments)
- Override type "UnifiButtonEntityDescription[HandlerT@UnifiButtonEntity]" is not the same as base type "UnifiEntityDescription[HandlerT@UnifiButtonEntity]" (reportIncompatibleVariableOverride)
+ Override type "UnifiButtonEntityDescription[HandlerT@UnifiButtonEntity]" is not the same as base type "UnifiEntityDescription[HandlerT@UnifiButtonEntity, Unknown]" (reportIncompatibleVariableOverride)
- /tmp/mypy_primer/projects/core/homeassistant/components/unifi/button.py:156:9 - warning: Method "async_update_state" is not marked as override but is overriding a method in class "UnifiEntity[HandlerT@UnifiButtonEntity]" (reportImplicitOverride)
+ /tmp/mypy_primer/projects/core/homeassistant/components/unifi/button.py:156:9 - warning: Method "async_update_state" is not marked as override but is overriding a method in class "UnifiEntity[HandlerT@UnifiButtonEntity, Unknown]" (reportImplicitOverride)
- /tmp/mypy_primer/projects/core/homeassistant/components/unifi/device_tracker.py:146:38 - error: Too many type arguments provided for "UnifiEntityDescription"; expected 1 but received 2 (reportInvalidTypeArguments)
- Type of "register_platform" is "(async_add_entities: AddEntitiesCallback, entity_class: type[UnifiEntity[Unknown]], descriptions: tuple[UnifiEntityDescription[Unknown], ...], requires_admin: bool = False) -> None" (reportUnknownMemberType)
+ Type of "register_platform" is "(async_add_entities: AddEntitiesCallback, entity_class: type[UnifiEntity[Unknown, Unknown]], descriptions: tuple[UnifiEntityDescription[Unknown, Unknown], ...], requires_admin: bool = False) -> None" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/core/homeassistant/components/unifi/device_tracker.py:234:48 - error: Too many type arguments provided for "UnifiEntity"; expected 1 but received 2 (reportInvalidTypeArguments)
- Override type "UnifiTrackerEntityDescription[Unknown]" is not the same as base type "UnifiEntityDescription[HandlerT@UnifiScannerEntity]" (reportIncompatibleVariableOverride)
+ Override type "UnifiTrackerEntityDescription[Unknown]" is not the same as base type "UnifiEntityDescription[HandlerT@UnifiScannerEntity, Unknown]" (reportIncompatibleVariableOverride)
- /tmp/mypy_primer/projects/core/homeassistant/components/unifi/device_tracker.py:244:9 - warning: Method "async_initiate_state" is not marked as override but is overriding a method in class "UnifiEntity[HandlerT@UnifiScannerEntity]" (reportImplicitOverride)
+ /tmp/mypy_primer/projects/core/homeassistant/components/unifi/device_tracker.py:244:9 - warning: Method "async_initiate_state" is not marked as override but is overriding a method in class "UnifiEntity[HandlerT@UnifiScannerEntity, Unknown]" (reportImplicitOverride)
- /tmp/mypy_primer/projects/core/homeassistant/components/unifi/device_tracker.py:292:9 - warning: Method "async_update_state" is not marked as override but is overriding a method in class "UnifiEntity[HandlerT@UnifiScannerEntity]" (reportImplicitOverride)
+ /tmp/mypy_primer/projects/core/homeassistant/components/unifi/device_tracker.py:292:9 - warning: Method "async_update_state" is not marked as override but is overriding a method in class "UnifiEntity[HandlerT@UnifiScannerEntity, Unknown]" (reportImplicitOverride)
- /tmp/mypy_primer/projects/core/homeassistant/components/unifi/device_tracker.py:323:9 - warning: Method "async_event_callback" is not marked as override but is overriding a method in class "UnifiEntity[HandlerT@UnifiScannerEntity]" (reportImplicitOverride)
+ /tmp/mypy_primer/projects/core/homeassistant/components/unifi/device_tracker.py:323:9 - warning: Method "async_event_callback" is not marked as override but is overriding a method in class "UnifiEntity[HandlerT@UnifiScannerEntity, Unknown]" (reportImplicitOverride)
- /tmp/mypy_primer/projects/core/homeassistant/components/unifi/device_tracker.py:342:15 - warning: Method "async_added_to_hass" is not marked as override but is overriding a method in class "UnifiEntity[HandlerT@UnifiScannerEntity]" (reportImplicitOverride)
+ /tmp/mypy_primer/projects/core/homeassistant/components/unifi/device_tracker.py:342:15 - warning: Method "async_added_to_hass" is not marked as override but is overriding a method in class "UnifiEntity[HandlerT@UnifiScannerEntity, Unknown]" (reportImplicitOverride)
- /tmp/mypy_primer/projects/core/homeassistant/components/unifi/entity.py:134:58 - error: Too many type arguments provided for "UnifiEntityDescription"; expected 1 but received 2 (reportInvalidTypeArguments)
- /tmp/mypy_primer/projects/core/homeassistant/components/unifi/entity.py:141:55 - error: Too many type arguments provided for "UnifiEntityDescription"; expected 1 but received 2 (reportInvalidTypeArguments)
+ /tmp/mypy_primer/projects/core/homeassistant/components/unifi/entity.py:141:9 - warning: Type of parameter "description" is partially unknown
+ Parameter type is "UnifiEntityDescription[HandlerT@UnifiEntity, Unknown]" (reportUnknownParameterType)
- Override type "UnifiEntityDescription[HandlerT@UnifiEntity]" is not the same as base type "EntityDescription" (reportIncompatibleVariableOverride)
+ Override type "UnifiEntityDescription[HandlerT@UnifiEntity, Unknown]" is not the same as base type "EntityDescription" (reportIncompatibleVariableOverride)
+ /tmp/mypy_primer/projects/core/homeassistant/components/unifi/entity.py:164:9 - warning: Type of "description" is partially unknown
+ Type of "description" is "UnifiEntityDescription[HandlerT@UnifiEntity, Unknown]" (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/core/homeassistant/components/unifi/entity.py:164:23 - warning: Type of "entity_description" is partially unknown
+ Type of "entity_description" is "UnifiEntityDescription[HandlerT@UnifiEntity, Unknown]" (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/core/homeassistant/components/unifi/entity.py:218:9 - warning: Type of "description" is partially unknown
+ Type of "description" is "UnifiEntityDescription[HandlerT@UnifiEntity, Unknown]" (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/core/homeassistant/components/unifi/entity.py:218:23 - warning: Type of "entity_description" is partially unknown
+ Type of "entity_description" is "UnifiEntityDescription[HandlerT@UnifiEntity, Unknown]" (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/core/homeassistant/components/unifi/entity.py:234:16 - warning: Type of "entity_description" is partially unknown
+ Type of "entity_description" is "UnifiEntityDescription[HandlerT@UnifiEntity, Unknown]" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/core/homeassistant/components/unifi/image.py:41:62 - error: Too many type arguments provided for "UnifiEntityDescription"; expected 1 but received 2 (reportInvalidTypeArguments)
- Type of "register_platform" is "(async_add_entities: AddEntitiesCallback, entity_class: type[UnifiEntity[Unknown]], descriptions: tuple[UnifiEntityDescription[Unknown], ...], requires_admin: bool = False) -> None" (reportUnknownMemberType)
+ Type of "register_platform" is "(async_add_entities: AddEntitiesCallback, entity_class: type[UnifiEntity[Unknown, Unknown]], descriptions: tuple[UnifiEntityDescription[Unknown, Unknown], ...], requires_admin: bool = False) -> None" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/core/homeassistant/components/unifi/image.py:78:46 - error: Too many type arguments provided for "UnifiEntity"; expected 1 but received 2 (reportInvalidTypeArguments)
- Override type "UnifiImageEntityDescription[HandlerT@UnifiImageEntity]" is not the same as base type "UnifiEntityDescription[HandlerT@UnifiImageEntity]" (reportIncompatibleVariableOverride)
+ Override type "UnifiImageEntityDescription[HandlerT@UnifiImageEntity]" is not the same as base type "UnifiEntityDescription[HandlerT@UnifiImageEntity, Unknown]" (reportIncompatibleVariableOverride)
- /tmp/mypy_primer/projects/core/homeassistant/components/unifi/image.py:91:55 - error: Too many type arguments provided for "UnifiEntityDescription"; expected 1 but received 2 (reportInvalidTypeArguments)
+ /tmp/mypy_primer/projects/core/homeassistant/components/unifi/image.py:91:9 - warning: Type of parameter "description" is partially unknown
+ Parameter type is "UnifiEntityDescription[HandlerT@UnifiImageEntity, Unknown]" (reportUnknownParameterType)
+ /tmp/mypy_primer/projects/core/homeassistant/components/unifi/image.py:94:9 - warning: Type of "__init__" is partially unknown
+ Type of "__init__" is "(obj_id: str, hub: UnifiHub, description: UnifiEntityDescription[HandlerT@UnifiImageEntity, Unknown]) -> None" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/core/homeassistant/components/unifi/image.py:106:9 - warning: Method "async_update_state" is not marked as override but is overriding a method in class "UnifiEntity[HandlerT@UnifiImageEntity]" (reportImplicitOverride)
... (truncated 84 lines) ...
mitmproxy (https://github.com/mitmproxy/mitmproxy)
- /tmp/mypy_primer/projects/mitmproxy/mitmproxy/hooks.py:19:5 - error: Instance variable "name" is not initialized in the class body or __init__ method (reportUninitializedInstanceVariable)
- 3136 errors, 31421 warnings, 0 notes
+ 3135 errors, 31421 warnings, 0 notes
pytest-robotframework (https://github.com/detachhead/pytest-robotframework)
- /tmp/mypy_primer/projects/pytest-robotframework/pytest_robotframework/__init__.py:206:53 - error: Expected no type arguments for class "SuppressableContextManager" (reportInvalidTypeArguments)
- /tmp/mypy_primer/projects/pytest-robotframework/pytest_robotframework/__init__.py:261:17 - error: Expected no type arguments for class "SuppressableContextManager" (reportInvalidTypeArguments)
- Type of "inner" is "(fn: () -> Unknown, status_reporter: SuppressableContextManager, /, ...) -> Unknown" (reportUnknownMemberType)
+ Type of "inner" is "(fn: () -> Unknown, status_reporter: SuppressableContextManager[object], /, ...) -> Unknown" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/pytest-robotframework/pytest_robotframework/_internal/robot/library.py:72:2 - error: Argument of type "(arg: Cloaked) -> None" cannot be assigned to parameter "fn" of type "() -> Unknown" in function "keyword"
... (truncated 108 lines) ...``` |
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.
fixes #850