-
Notifications
You must be signed in to change notification settings - Fork 21
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.387 #829
Merged
Merged
Merge 1.1.387 #829
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
Currently the return type of PyrightServer.createHost is left blank, inferred by typescript to be FullAccessHost. Therefore anyone who inherits from PyrightServer must also return FullAccessHost. We should specify the return type explicitly. That way someone can inherit from it and return NoAccessHost, say.
Co-authored-by: Azure Piplines <41898282+github-actions[bot]@users.noreply.github.com>
… to handle the case where `x` is a type variable with a literal upper bound or value constraints that are literals. This addresses #9300. (#9318)
…` or `**kwargs` arguments to a callable parameterized by a ParamSpec. This addresses #9319. (#9322)
…mined because it refers to itself" error caused by a false dependency due to narrowing logic. This may also improve type analysis performance in some code. This addresses #9139. (#9323)
… latest toml standard. This addresses #9296.
…l` if the LHS doesn't support containment. Previously, the expression evaluated to `Never`. This addresses #9327. (#9328)
…ed by a TypeVarTuple is used in conjunction with a Self type. This addresses #9340. (#9342)
…rotocol matching that involves an attribute with a callable type parameterized by a ParamSpec. This addresses #9330. (#9344)
… the `__set__` and `__get__` methods are overloaded. This addresses #9332. (#9345)
…eturn types in deep call hierarchies within untyped code. This addresses #9283. (#9346)
… that involves both class-scoped and method-scoped type variables. This addresses #9347. (#9348)
…lance. If Pylance is installed in the workspace but is not configured to be loaded (i.e. the "python.languageServer" is set to "None"), then pyright will allow itself to be loaded. This addresses #9325.
* Fix * Unit test
…e(Protocol)` as a base class. This addresses #9217. (#9356) This fix involves a change to the internal isSameGenericClass method, which was previously too permissive. This change required dozens of downstream changes, and it has a high risk of regression.
# Conflicts: # packages/pyright-internal/package-lock.json # packages/pyright-internal/package.json # packages/pyright-internal/src/analyzer/service.ts # packages/pyright-internal/src/analyzer/typeEvaluator.ts # 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/typedDictInline1.py # packages/pyright-internal/src/tests/typeEvaluator7.test.ts # packages/pyright/package-lock.json # packages/pyright/package.json # packages/vscode-pyright/package.json # packages/vscode-pyright/src/extension.ts
Diff from mypy_primer, showing the effect of this PR on open source code: kornia (https://github.com/kornia/kornia)
- /tmp/mypy_primer/projects/kornia/kornia/feature/scale_space_detector.py:165:16 - warning: Variable "N" is not accessed (reportUnusedVariable)
- /tmp/mypy_primer/projects/kornia/kornia/feature/scale_space_detector.py:179:53 - warning: Argument type is unknown
- Argument corresponds to parameter "max_coords" in function "_scale_index_to_scale" (reportUnknownArgumentType)
- /tmp/mypy_primer/projects/kornia/kornia/feature/scale_space_detector.py:179:70 - warning: Argument type is unknown
- Argument corresponds to parameter "sigmas" in function "_scale_index_to_scale" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/kornia/kornia/feature/scale_space_detector.py:185:36 - warning: Type of "view" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/kornia/kornia/feature/scale_space_detector.py:186:21 - warning: Type of "view" is unknown (reportUnknownMemberType)
- 6203 errors, 46305 warnings, 0 notes
+ 6203 errors, 46304 warnings, 0 notes
steam.py (https://github.com/Gobot1234/steam.py)
+ /tmp/mypy_primer/projects/steam.py/steam/http.py:899:9 - error: Return type, "Coroutine[Any, Any, list[dict[Unknown, Unknown]]]", is partially unknown (reportUnknownParameterType)
+ /tmp/mypy_primer/projects/steam.py/steam/http.py:901:25 - error: Expected class but received "dict[str, type[str]]" (reportGeneralTypeIssues)
+ /tmp/mypy_primer/projects/steam.py/steam/http.py:901:25 - error: Dictionary expression not allowed in type expression (reportInvalidTypeForm)
+ /tmp/mypy_primer/projects/steam.py/steam/http.py:901:25 - error: Too few type arguments provided for "dict"; expected 2 but received 1 (reportInvalidTypeArguments)
+ /tmp/mypy_primer/projects/steam.py/steam/utils.py:539:9 - error: Method "pop" overrides class "ChainMap" in an incompatible manner
+ Override does not handle all overloads of base method (reportIncompatibleMethodOverride)
+ /tmp/mypy_primer/projects/steam.py/steam/ext/commands/converters.py:382:25 - error: Type of "get_app_suggestions" is partially unknown
+ Type of "get_app_suggestions" is "(term: str, language: Language | None = None) -> Coroutine[Any, Any, list[dict[Unknown, Unknown]]]" (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/steam.py/steam/ext/commands/utils.py:49:9 - error: Method "get" overrides class "dict" in an incompatible manner
+ Override does not handle all overloads of base method (reportIncompatibleMethodOverride)
- 8480 errors, 97 warnings, 0 notes
+ 8487 errors, 97 warnings, 0 notes
pytest (https://github.com/pytest-dev/pytest)
+ Parameter "namespace" is missing in override (reportIncompatibleMethodOverride)
- Parameter 3 type mismatch: base parameter is type "_N@parse_args", override parameter is type "Namespace | None"
- Type "_N@parse_args" is not assignable to type "Namespace | None"
- "object*" is not assignable to "Namespace"
- "object*" is not assignable to "None" (reportIncompatibleMethodOverride)
- Type "((...) -> object) | type*" is not assignable to type "str | bool"
+ Type "((...) -> object) | type" is not assignable to type "str | bool"
+ Type "((...) -> object) | type" is not assignable to type "str"
+ Type "((...) -> object) | type" is not assignable to type "bool"
+ Type "str | bool" is not assignable to type "((...) -> object) | type"
- Type "type*" is not assignable to type "str | bool"
+ Type "((...) -> object) | type" is not assignable to type "str | bool"
- "type*" is not assignable to "str"
+ Type "bool" is not assignable to type "((...) -> object) | type"
- "type*" is not assignable to "bool" (reportIncompatibleMethodOverride)
+ Type "bool" is not assignable to type "(...) -> object" (reportIncompatibleMethodOverride)
- Type "((...) -> object) | type*" is not assignable to type "str | Sequence[str]"
+ Type "((...) -> object) | type" is not assignable to type "str | Sequence[str]"
+ Type "((...) -> object) | type" is not assignable to type "str"
+ Type "((...) -> object) | type" is not assignable to type "Sequence[str]"
+ Type "str | Sequence[str]" is not assignable to type "((...) -> object) | type"
- Type "type*" is not assignable to type "str | Sequence[str]"
+ Type "((...) -> object) | type" is not assignable to type "str | Sequence[str]"
+ Type "Sequence[str]" is not assignable to type "((...) -> object) | type" (reportIncompatibleMethodOverride)
- "type*" is not assignable to "str"
- "type*" is not assignable to "Sequence[str]" (reportIncompatibleMethodOverride)
- Type "((...) -> object) | type*" is not assignable to type "str"
+ Type "((...) -> object) | type" is not assignable to type "str"
+ Type "str" is not assignable to type "((...) -> object) | type"
+ Type "((...) -> object) | type" is not assignable to type "str"
+ Type "str" is not assignable to type "(...) -> object"
+ "str" is not assignable to "type"
- "type*" is not assignable to "str" (reportIncompatibleMethodOverride)
+ "function" is not assignable to "str" (reportIncompatibleMethodOverride)
- Type "((...) -> object) | type*" is not assignable to type "str"
+ Type "((...) -> object) | type" is not assignable to type "str"
+ Type "str" is not assignable to type "((...) -> object) | type"
+ Type "((...) -> object) | type" is not assignable to type "str"
+ Type "str" is not assignable to type "(...) -> object"
+ "str" is not assignable to "type"
- "type*" is not assignable to "str" (reportIncompatibleMethodOverride)
+ "function" is not assignable to "str" (reportIncompatibleMethodOverride)
sympy (https://github.com/sympy/sympy)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/algorithms.py:16:5 - warning: Return type, "Self@Token | Unknown", is partially unknown (reportUnknownParameterType)
+ /tmp/mypy_primer/projects/sympy/sympy/codegen/algorithms.py:16:5 - warning: Return type, "Scope | Unknown", is partially unknown (reportUnknownParameterType)
+ /tmp/mypy_primer/projects/sympy/sympy/codegen/algorithms.py:110:21 - error: Argument of type "Print" cannot be assigned to parameter "object" of type "Declaration" in function "append"
+ "Print" is not assignable to "Declaration" (reportArgumentType)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/algorithms.py:112:12 - warning: Return type, "Self@Token | Unknown", is partially unknown (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/sympy/sympy/codegen/algorithms.py:112:12 - warning: Return type, "Scope | Unknown", is partially unknown (reportUnknownVariableType)
- Type of "xreplace" is "((rule: Unknown) -> (Unknown | Self@Token)) | Unknown" (reportUnknownMemberType)
+ Type of "xreplace" is "((rule: Unknown) -> (Unknown | Scope)) | Unknown" (reportUnknownMemberType)
- Type of "args" is "list[Self@Token | Unknown]" (reportUnknownVariableType)
+ Type of "args" is "list[String | Unknown]" (reportUnknownVariableType)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/ast.py:401:8 - error: Class definition for "NoneToken" depends on itself (reportGeneralTypeIssues)
- Type of "from_expr" is "(expr: Unknown) -> Self@Token" (reportUnknownMemberType)
+ Type of "from_expr" is "(expr: Unknown) -> (FloatBaseType | IntBaseType | ComplexBaseType | Type)" (reportUnknownMemberType)
- Type of "from_expr" is "(expr: Unknown) -> Self@Token" (reportUnknownMemberType)
+ Type of "from_expr" is "(expr: Unknown) -> (FloatBaseType | IntBaseType | ComplexBaseType | Type)" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/ast.py:1511:21 - warning: Type of "cast_check" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/sympy/sympy/codegen/ast.py:1511:21 - warning: Type of "cast_check" is partially unknown
- /tmp/mypy_primer/projects/sympy/sympy/codegen/ast.py:1511:27 - error: Cannot access attribute "cast_check" for class "Token*"
- Attribute "cast_check" is unknown (reportAttributeAccessIssue)
+ Type of "cast_check" is "(value: Unknown, rtol: Unknown | None = None, atol: int = 0, precision_targets: Unknown | None = None) -> Unknown" (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/sympy/sympy/codegen/ast.py:1511:38 - warning: Argument type is unknown
+ Argument corresponds to parameter "value" in function "cast_check" (reportUnknownArgumentType)
- Type of "newtons_method" is "(expr: Unknown, wrt: Unknown, atol: float = 1e-12, delta: Unknown | None = None, *, rtol: float = 4e-16, debug: bool = False, itermax: Unknown | None = None, counter: Unknown | None = None, delta_fn: Unknown = lambda e, x: -e / e.diff(x), cse: bool = False, handle_nan: Unknown | None = None, bounds: Unknown | None = None) -> (Self@Token | Unknown)" (reportUnknownVariableType)
+ Type of "newtons_method" is "(expr: Unknown, wrt: Unknown, atol: float = 1e-12, delta: Unknown | None = None, *, rtol: float = 4e-16, debug: bool = False, itermax: Unknown | None = None, counter: Unknown | None = None, delta_fn: Unknown = lambda e, x: -e / e.diff(x), cse: bool = False, handle_nan: Unknown | None = None, bounds: Unknown | None = None) -> (Scope | Unknown)" (reportUnknownVariableType)
- Type of "algo" is "Self@Token | Unknown" (reportUnknownVariableType)
+ Type of "algo" is "Scope | Unknown" (reportUnknownVariableType)
- Type of "from_expr" is "(expr: Unknown) -> Self@Token" (reportUnknownMemberType)
+ Type of "from_expr" is "(expr: Unknown) -> (FloatBaseType | IntBaseType | ComplexBaseType | Type)" (reportUnknownMemberType)
- Type of "from_expr" is "(expr: Unknown) -> Self@Token" (reportUnknownMemberType)
+ Type of "from_expr" is "(expr: Unknown) -> (FloatBaseType | IntBaseType | ComplexBaseType | Type)" (reportUnknownMemberType)
- Type of "from_expr" is "(expr: Unknown) -> Self@Token" (reportUnknownMemberType)
+ Type of "from_expr" is "(expr: Unknown) -> (FloatBaseType | IntBaseType | ComplexBaseType | Type)" (reportUnknownMemberType)
- Type of "from_expr" is "(expr: Unknown) -> Self@Token" (reportUnknownMemberType)
+ Type of "from_expr" is "(expr: Unknown) -> (FloatBaseType | IntBaseType | ComplexBaseType | Type)" (reportUnknownMemberType)
- Type of "from_expr" is "(expr: Unknown) -> Self@Token" (reportUnknownMemberType)
+ Type of "from_expr" is "(expr: Unknown) -> (FloatBaseType | IntBaseType | ComplexBaseType | Type)" (reportUnknownMemberType)
- Type of "from_expr" is "(expr: Unknown) -> Self@Token" (reportUnknownMemberType)
+ Type of "from_expr" is "(expr: Unknown) -> (FloatBaseType | IntBaseType | ComplexBaseType | Type)" (reportUnknownMemberType)
- Type of "from_expr" is "(expr: Unknown) -> Self@Token" (reportUnknownMemberType)
+ Type of "from_expr" is "(expr: Unknown) -> (FloatBaseType | IntBaseType | ComplexBaseType | Type)" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:324:32 - warning: Type of "cast_check" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:324:32 - warning: Type of "cast_check" is partially unknown
+ Type of "cast_check" is "(value: Unknown, rtol: Unknown | None = None, atol: int = 0, precision_targets: Unknown | None = None) -> Unknown" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:324:40 - error: Cannot access attribute "cast_check" for class "Token*"
- Attribute "cast_check" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:325:12 - warning: Type of "cast_check" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:325:12 - warning: Type of "cast_check" is partially unknown
+ Type of "cast_check" is "(value: Unknown, rtol: Unknown | None = None, atol: int = 0, precision_targets: Unknown | None = None) -> Unknown" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:325:20 - error: Cannot access attribute "cast_check" for class "Token*"
- Attribute "cast_check" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:326:12 - warning: Type of "cast_check" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:326:12 - warning: Type of "cast_check" is partially unknown
+ Type of "cast_check" is "(value: Unknown, rtol: Unknown | None = None, atol: int = 0, precision_targets: Unknown | None = None) -> Unknown" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:326:20 - error: Cannot access attribute "cast_check" for class "Token*"
- Attribute "cast_check" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:327:12 - warning: Type of "cast_check" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:327:12 - warning: Type of "cast_check" is partially unknown
+ Type of "cast_check" is "(value: Unknown, rtol: Unknown | None = None, atol: int = 0, precision_targets: Unknown | None = None) -> Unknown" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:327:20 - error: Cannot access attribute "cast_check" for class "Token*"
- Attribute "cast_check" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:330:12 - warning: Type of "cast_check" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:330:12 - warning: Type of "cast_check" is partially unknown
+ Type of "cast_check" is "(value: Unknown, rtol: Unknown | None = None, atol: int = 0, precision_targets: Unknown | None = None) -> Unknown" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:330:17 - error: Cannot access attribute "cast_check" for class "Token*"
- Attribute "cast_check" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:331:32 - warning: Type of "cast_check" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:331:32 - warning: Type of "cast_check" is partially unknown
+ Type of "cast_check" is "(value: Unknown, rtol: Unknown | None = None, atol: int = 0, precision_targets: Unknown | None = None) -> Unknown" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:331:37 - error: Cannot access attribute "cast_check" for class "Token*"
- Attribute "cast_check" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:332:12 - warning: Type of "cast_check" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:332:12 - warning: Type of "cast_check" is partially unknown
+ Type of "cast_check" is "(value: Unknown, rtol: Unknown | None = None, atol: int = 0, precision_targets: Unknown | None = None) -> Unknown" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:332:17 - error: Cannot access attribute "cast_check" for class "Token*"
- Attribute "cast_check" is unknown (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/sympy/sympy/codegen/tests/test_ast.py:333:32 - warning: Type of "cast_check" is unknown (reportUnknownMemberType)
... (truncated 4858 lines) ...
black (https://github.com/psf/black)
- /tmp/mypy_primer/projects/black/src/blib2to3/pytree.py:438:9 - error: Method "_eq" overrides class "Base" in an incompatible manner
- Parameter 2 type mismatch: base parameter is type "_P@_eq", override parameter is type "Leaf"
- "Base*" is not assignable to "Leaf" (reportIncompatibleMethodOverride)
- 249 errors, 1226 warnings, 0 notes
+ 248 errors, 1226 warnings, 0 notes
mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
- /tmp/mypy_primer/projects/mongo-python-driver/bson/son.py:126:9 - error: Method "pop" overrides class "dict" in an incompatible manner
- Return type mismatch: base method returns type "_Value@SON", override returns type "_Value@SON | _T@pop"
- Type "_Value@SON | _T@pop" is not assignable to type "_Value@SON" (reportIncompatibleMethodOverride)
- /tmp/mypy_primer/projects/mongo-python-driver/bson/son.py:162:9 - error: Method "get" overrides class "dict" in an incompatible manner
- Return type mismatch: base method returns type "_Value@SON | None", override returns type "_Value@SON | _T@get | None"
- Type "_Value@SON | _T@get | None" is not assignable to type "_Value@SON | None"
- Type "_T@get" is not assignable to type "_Value@SON | None"
- Type "_T@get" is not assignable to type "_Value@SON"
- "object*" is not assignable to "None" (reportIncompatibleMethodOverride)
- 4170 errors, 49779 warnings, 0 notes
+ 4168 errors, 49779 warnings, 0 notes
apprise (https://github.com/caronc/apprise)
+ /tmp/mypy_primer/projects/apprise/apprise/plugins/nextcloud.py:213:20 - warning: Type of "version" is partially unknown
+ Type of "version" is "Unknown | int" (reportUnknownMemberType)
- 8527 errors, 43825 warnings, 0 notes
+ 8527 errors, 43826 warnings, 0 notes
scikit-learn (https://github.com/scikit-learn/scikit-learn)
+ /tmp/mypy_primer/projects/scikit-learn/sklearn/covariance/_graph_lasso.py:1015:45 - warning: Type of "n_jobs" is partially unknown
+ Type of "n_jobs" is "Unknown | None" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/scikit-learn/sklearn/neural_network/_multilayer_perceptron.py:650:17 - warning: Type of "n_iter_" is partially unknown
- Type of "n_iter_" is "int | Unknown" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/scikit-learn/sklearn/neural_network/_multilayer_perceptron.py:656:58 - warning: Type of "n_iter_" is partially unknown
- Type of "n_iter_" is "int | Unknown" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/scikit-learn/sklearn/neural_network/_multilayer_perceptron.py:690:20 - warning: Type of "n_iter_" is partially unknown
- Type of "n_iter_" is "int | Unknown" (reportUnknownMemberType)
- 16737 errors, 196082 warnings, 0 notes
+ 16737 errors, 196080 warnings, 0 notes
bokeh (https://github.com/bokeh/bokeh)
+ /tmp/mypy_primer/projects/bokeh/examples/server/app/line_on_off.py:22:8 - error: Cannot assign to attribute "visible" for class "GlyphRenderer"
+ Expression of type "bool" cannot be assigned to attribute "visible" of class "GlyphRenderer"
+ "bool" is not assignable to "Bool" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/bokeh/examples/server/app/line_on_off.py:23:8 - error: Cannot assign to attribute "visible" for class "GlyphRenderer"
+ Expression of type "bool" cannot be assigned to attribute "visible" of class "GlyphRenderer"
+ "bool" is not assignable to "Bool" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/bokeh/examples/server/app/line_on_off.py:24:8 - error: Cannot assign to attribute "visible" for class "GlyphRenderer"
+ Expression of type "bool" cannot be assigned to attribute "visible" of class "GlyphRenderer"
+ "bool" is not assignable to "Bool" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/bokeh/src/bokeh/core/has_props.py:114:12 - error: Type "type[C@abstract]" is not assignable to return type "C@abstract"
- Type "type[C@abstract]" is not assignable to type "C@abstract" (reportReturnType)
- /tmp/mypy_primer/projects/bokeh/src/bokeh/core/property/container.py:130:9 - error: Method "wrap" overrides class "Property" in an incompatible manner
- Parameter 2 type mismatch: base parameter is type "T@List", override parameter is type "list[T@List]"
- Return type mismatch: base method returns type "T@List", override returns type "PropertyValueList[T@List]"
- "object*" is not assignable to "list[T@List]"
- Type "PropertyValueList[T@List]" is not assignable to type "T@List" (reportIncompatibleMethodOverride)
- /tmp/mypy_primer/projects/bokeh/src/bokeh/core/property/container.py:157:9 - error: Method "wrap" overrides class "Property" in an incompatible manner
- Parameter 2 type mismatch: base parameter is type "T@Set", override parameter is type "set[T@Set]"
- Return type mismatch: base method returns type "T@Set", override returns type "PropertyValueSet[T@Set]"
- "object*" is not assignable to "set[T@Set]"
- Type "PropertyValueSet[T@Set]" is not assignable to type "T@Set" (reportIncompatibleMethodOverride)
+ "SupportsIndex" is not assignable to "int" (reportIncompatibleMethodOverride)
- Return type mismatch: base method returns type "T@PropertyValueList", override returns type "T@PropertyValueList"
- "SupportsIndex" is not assignable to "int"
- Type "T@PropertyValueList" is not assignable to type "T@PropertyValueList" (reportIncompatibleMethodOverride)
- /tmp/mypy_primer/projects/bokeh/src/bokeh/core/property/wrappers.py:371:9 - error: Method "pop" overrides class "dict" in an incompatible manner
- Return type mismatch: base method returns type "T_Val@PropertyValueDict", override returns type "T_Val@PropertyValueDict"
- Type "T_Val@PropertyValueDict" is not assignable to type "T_Val@PropertyValueDict" (reportIncompatibleMethodOverride)
- /tmp/mypy_primer/projects/bokeh/src/bokeh/core/property/wrappers.py:375:9 - error: Method "popitem" overrides class "MutableMapping" in an incompatible manner
- Return type mismatch: base method returns type "tuple[str, T_Val@PropertyValueDict]", override returns type "tuple[str, T_Val@PropertyValueDict]"
- "builtins.tuple" is not assignable to "builtins.tuple"
- Tuple entry 2 is incorrect type
- Type "T_Val@PropertyValueDict" is not assignable to type "T_Val@PropertyValueDict" (reportIncompatibleMethodOverride)
- /tmp/mypy_primer/projects/bokeh/src/bokeh/core/property/wrappers.py:379:9 - error: Method "setdefault" overrides class "MutableMapping" in an incompatible manner
- Return type mismatch: base method returns type "T_Val@PropertyValueDict", override returns type "T_Val@PropertyValueDict"
- Type "T_Val@PropertyValueDict" is not assignable to type "T_Val@PropertyValueDict" (reportIncompatibleMethodOverride)
+ /tmp/mypy_primer/projects/bokeh/tests/unit/bokeh/command/subcommands/apps/line_on_off.py:25:8 - error: Cannot assign to attribute "visible" for class "GlyphRenderer"
+ Expression of type "bool" cannot be assigned to attribute "visible" of class "GlyphRenderer"
+ "bool" is not assignable to "Bool" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/bokeh/tests/unit/bokeh/command/subcommands/apps/line_on_off.py:26:8 - error: Cannot assign to attribute "visible" for class "GlyphRenderer"
+ Expression of type "bool" cannot be assigned to attribute "visible" of class "GlyphRenderer"
+ "bool" is not assignable to "Bool" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/bokeh/tests/unit/bokeh/command/subcommands/apps/line_on_off.py:27:8 - error: Cannot assign to attribute "visible" for class "GlyphRenderer"
+ Expression of type "bool" cannot be assigned to attribute "visible" of class "GlyphRenderer"
+ "bool" is not assignable to "Bool" (reportAttributeAccessIssue)
koda-validate (https://github.com/keithasaurus/koda-validate)
- /tmp/mypy_primer/projects/koda-validate/koda_validate/dataclasses.py:119:13 - warning: Code is unreachable (reportUnreachable)
- 258 errors, 3072 warnings, 0 notes
+ 258 errors, 3071 warnings, 0 notes
mkdocs (https://github.com/mkdocs/mkdocs)
- /tmp/mypy_primer/projects/mkdocs/mkdocs/config/config_options.py:170:9 - error: Method "validate" overrides class "BaseConfigOption" in an incompatible manner
- Return type mismatch: base method returns type "T@OptionallyRequired", override returns type "object | None"
- Type "object | None" is not assignable to type "T@OptionallyRequired" (reportIncompatibleMethodOverride)
- 353 errors, 5737 warnings, 0 notes
+ 352 errors, 5737 warnings, 0 notes
core (https://github.com/home-assistant/core)
- /tmp/mypy_primer/projects/core/homeassistant/components/alexa/capabilities.py:1427:63 - warning: "ATTR_MODE" is not exported from module "homeassistant.components.humidifier" (reportPrivateLocalImportUsage)
- /tmp/mypy_primer/projects/core/homeassistant/components/push/camera.py:158:24 - warning: Argument type is partially unknown
- Argument corresponds to parameter "action" in function "async_track_point_in_utc_time"
- Argument type is "(now: Unknown) -> None" (reportUnknownArgumentType)
- Type of "output_type" is "type[Unknown] | type[type[StubPrinter]] | type[(obj: Unknown, name: Unknown, default: Unknown | None = None) -> (Any | None)] | type[(op: str, target: Any, operand: Any) -> Any]" (reportUnknownVariableType)
+ Type of "output_type" is "type[Unknown] | type[type[StubPrinter]] | type[(obj: Unknown, name: Unknown, default: Unknown | None = None) -> (Any | None)] | type[(op: str, target: Any, operand: Any) -> Any] | type[Logger]" (reportUnknownVariableType)
+ /tmp/mypy_primer/projects/core/homeassistant/components/reolink/__init__.py:337:24 - warning: Type of "api" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/core/homeassistant/components/reolink/__init__.py:337:24 - warning: Type of "mac_address" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/core/homeassistant/components/reolink/__init__.py:337:24 - warning: Argument type is unknown
+ Argument corresponds to parameter "args" in function "__call__" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/core/homeassistant/components/switchbot/config_flow.py:280:21 - warning: Type of "device" is unknown (reportUnknownMemberType)
+ /tmp/mypy_primer/projects/core/homeassistant/components/switchbot/config_flow.py:280:44 - warning: Type of "advertisement" is unknown (reportUnknownMemberType)
- /tmp/mypy_primer/projects/core/homeassistant/components/wyoming/assist_satellite.py:519:32 - warning: Type of "_client" is unknown (reportUnknownMemberType)
- /tmp/mypy_primer/projects/core/homeassistant/components/wyoming/assist_satellite.py:519:32 - warning: Type of "read_event" is unknown (reportUnknownMemberType)
- /tmp/mypy_primer/projects/core/homeassistant/components/wyoming/assist_satellite.py:519:32 - warning: Argument type is unknown
- Argument corresponds to parameter "target" in function "async_create_background_task" (reportUnknownArgumentType)
- /tmp/mypy_primer/projects/core/homeassistant/components/xiaomi_aqara/binary_sensor.py:289:38 - warning: Type of "_async_set_no_motion" is partially unknown
- Type of "_async_set_no_motion" is "(now: Unknown) -> None" (reportUnknownMemberType)
- /tmp/mypy_primer/projects/core/homeassistant/components/xiaomi_aqara/binary_sensor.py:289:38 - warning: Argument type is partially unknown
- Argument corresponds to parameter "action" in function "async_call_later"
- Argument type is "(now: Unknown) -> None" (reportUnknownArgumentType)
- 26609 errors, 315268 warnings, 0 notes
+ 26609 errors, 315266 warnings, 0 notes
pip (https://github.com/pypa/pip)
+ /tmp/mypy_primer/projects/pip/src/pip/_vendor/msgpack/fallback.py:531:54 - warning: Argument type is partially unknown
+ Argument corresponds to parameter "o" in function "__init__"
+ Argument type is "int | Any | Unknown | tuple[Unknown, ...] | list[Unknown] | dict[Unknown, Unknown] | bytes | str | float | datetime | Timestamp | ExtType | bytearray | bool | None" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/pip/src/pip/_vendor/msgpack/fallback.py:532:80 - warning: Argument type is partially unknown
+ Argument corresponds to parameter "object" in function "__new__"
+ Argument type is "type[int] | type[Unknown] | type[None] | type[tuple[Unknown, ...]] | type[list[Unknown]] | type[dict[Unknown, Unknown]] | type[bytes] | type[str] | type[float] | type[datetime] | type[Timestamp] | type[ExtType] | type[bytearray] | type[bool]" (reportUnknownArgumentType)
+ /tmp/mypy_primer/projects/pip/src/pip/_vendor/msgpack/fallback.py:532:85 - warning: Argument type is partially unknown
+ Argument corresponds to parameter "o" in function "__init__"
+ Argument type is "int | Any | Unknown | tuple[Unknown, ...] | list[Unknown] | dict[Unknown, Unknown] | bytes | str | float | datetime | Timestamp | ExtType | bytearray | bool | None" (reportUnknownArgumentType)
- /tmp/mypy_primer/projects/pip/src/pip/_vendor/pygments/formatters/rtf.py:333:27 - warning: Type of "_escape_text" is partially unknown
- Type of "_escape_text" is "(text: Unknown) -> (LiteralString | Literal[''])" (reportUnknownMemberType)
- 2400 errors, 37737 warnings, 0 notes
+ 2400 errors, 37739 warnings, 0 notes
streamlit (https://github.com/streamlit/streamlit)
- /tmp/mypy_primer/projects/streamlit/lib/streamlit/elements/lib/options_selector_utils.py:110:12 - warning: Unnecessary isinstance call; "type[E2@_coerce_enum]" is always an instance of "EnumMeta" (reportUnnecessaryIsInstance)
- /tmp/mypy_primer/projects/streamlit/lib/streamlit/elements/lib/options_selector_utils.py:111:9 - warning: Code is unreachable (reportUnreachable)
- 5925 errors, 47317 warnings, 0 notes
+ 5925 errors, 47315 warnings, 0 notes
zulip (https://github.com/zulip/zulip)
+ /tmp/mypy_primer/projects/zulip/zerver/lib/user_groups.py:813:27 - warning: Type of "realm" is unknown (reportUnknownMemberType)
- 5618 errors, 122981 warnings, 0 notes
... (truncated 389 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 #828