-
Notifications
You must be signed in to change notification settings - Fork 38
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.381 #676
Merged
Merged
Merge 1.1.381 #676
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
…rns in the negative (fall-through) case when the subject is a tuple with an unbounded entry. This addresses #8967. (#8968)
* Push pylance changes to pyright * Update typeForm4.py
…ttempting to assign the expression `type(Any)` to type `type[Any]`. This addresses #8973. (#8976)
…oubly-nested loop that is assigned a value in an assignment expression. This addresses #8979. (#8980)
… user-defined type guard in certain cases when variable type is a union. This addresses #8966. (#8981)
This change fixes a bug in which module imports stop resolving after file edits that change the set of modules a file imports. Previously, in _updateSourceFileImports, we would mutate the import list of the source file we were updating only if the new imports list was longer than the old list or any element mismatched between the old and new lists. This behavior led to a situation in which, potentially due to buffer editing, if the new import list was a prefix of the old list, we would fail to call sourceFileInfo.mutate(). Consequently, when those imports came back (perhaps due to further buffer editing) we would skip adding them to the sourceFileInfo import list (because, as we didn't call sourceFileInfo.mutate(), we falsely believe we still had the imports). Because we skipped the addition logic, we would not add the importing buffer to the importedBy lists of the imported SourceFileInfo. If not updating the importedBy list ended up leaving it empty, we regarded the imported source files as "not needed", didn't parse them, and consequently failed to resolve symbols imported from these modules. Now, we call sourceFileInfo.mutate() when the old and new import lists differ in any way, restoring correct behavior under buffer edits that remove imports.
…`isinstance` in the negative case when using `type` as a filter. This addresses #8963 and #8988. (#8990)
… `isinstance` or `issubclass` call always evaluates to `False`. This addresses #8961. (#8992)
…n a deprecation diagnostic message.
…re the LHS is an instance variable reference. This addresses #8943. (#8994)
…NoReturn` callable with a function decorator applied. This addresses microsoft/pylance-release#6391. (#8996)
…under very specific conditions. This addresses #4513. (#8997)
…ating expressions that involve parameter symbols. (#8999)
…rsects `type[A]` with `type[B]`. Previously, pyright was producing `<subclass of type[A] and type[B]>` but now produces `type[<subclass of A and B>]`. This addresses #9002 and #9003. (#9005)
* Allow venvPath to be set on command line or in settings whether or not it's set in config file * Fix setting the venvPath in the extension
…cing a missing `__set__` method when assigning to a class variable that is not a descriptor object. This addresses #9011. (#9014)
… error message when assigning to a class variable that uses `Self` in its type definition. This addresses #9011. (#9013)
…chedule analysis (#9016) * Recreate the cancellation token every time we start analysis like we used to before * Refactor how token is generated to match old way of doing things
…pression" errors when a type alias is used in a loop in both a type expression and a value expression. This addresses #9017. (#9018)
Add new vscode signing, make sure signature file is different from the source manifest file. When publishing to marketplace reuse artifacts for VSIX, instead of downloading from github Include new manifest and signature files when publishing to marketplace
# Conflicts: # docs/configuration.md # packages/pyright-internal/src/analyzer/cacheManager.ts # packages/pyright-internal/src/analyzer/service.ts # packages/pyright-internal/src/backgroundAnalysisBase.ts # packages/pyright-internal/src/backgroundThreadBase.ts # packages/pyright-internal/src/languageServerBase.ts # packages/pyright-internal/src/localization/package.nls.en-us.json # packages/pyright-internal/src/localization/package.nls.ru.json # packages/pyright/package-lock.json # packages/pyright/package.json # packages/vscode-pyright/package.json
DetachHead
commented
Sep 18, 2024
fca9c00
to
f7d2ada
Compare
f7d2ada
to
958af90
Compare
This comment has been minimized.
This comment has been minimized.
Diff from mypy_primer, showing the effect of this PR on open source code: anyio (https://github.com/agronholm/anyio)
- /tmp/mypy_primer/projects/anyio/src/anyio/_backends/_asyncio.py:1999:64 - error: Argument of type "_TaskCompatibleCoro[Unknown] | None" cannot be assigned to parameter "coro" of type "Generator[Any, Any, Any] | Awaitable[Any]" in function "__init__" (reportArgumentType)
+ /tmp/mypy_primer/projects/anyio/src/anyio/_backends/_asyncio.py:1999:64 - error: Argument of type "_TaskCompatibleCoro[Unknown] | None" cannot be assigned to parameter "coro" of type "Generator[Any, Any, Any] | Awaitable[Any]" in function "__init__"
+ Type "_TaskCompatibleCoro[Unknown] | None" is not assignable to type "Generator[Any, Any, Any] | Awaitable[Any]"
+ Type "None" is not assignable to type "Generator[Any, Any, Any] | Awaitable[Any]"
+ "None" is not assignable to "Generator[Any, Any, Any]"
+ "None" is incompatible with protocol "Awaitable[Any]"
+ "__await__" is not present (reportArgumentType)
- /tmp/mypy_primer/projects/anyio/src/anyio/_core/_fileio.py:655:10 - error: Cannot access attribute "register" for class "type[PathLike[AnyStr_co@PathLike]] & TypeForm[PathLike[Unknown]]"
+ /tmp/mypy_primer/projects/anyio/src/anyio/_core/_fileio.py:655:10 - error: Cannot access attribute "register" for class "type[PathLike[AnyStr_co@PathLike]]"
pytest-robotframework (https://github.com/detachhead/pytest-robotframework)
+ /tmp/mypy_primer/projects/pytest-robotframework/pytest_robotframework/__init__.py:239:12 - error: Unnecessary isinstance call; "() -> Unknown" is never an instance of "_KeywordDecorator" (reportUnnecessaryIsInstance)
- 2258 errors, 0 warnings, 0 notes
+ 2259 errors, 0 warnings, 0 notes
pyinstrument (https://github.com/joerick/pyinstrument)
- /tmp/mypy_primer/projects/pyinstrument/pyinstrument/context_manager.py:40:36 - error: Argument of type "float | str | bool | None" cannot be assigned to parameter "async_mode" of type "AsyncMode" in function "__init__" (reportArgumentType)
+ /tmp/mypy_primer/projects/pyinstrument/pyinstrument/context_manager.py:40:36 - error: Argument of type "float | str | bool | None" cannot be assigned to parameter "async_mode" of type "AsyncMode" in function "__init__"
+ Type "float | str | bool | None" is not assignable to type "AsyncMode"
+ Type "float" is not assignable to type "AsyncMode"
+ "float" is not assignable to "Literal['enabled']"
+ "float" is not assignable to "Literal['disabled']"
+ "float" is not assignable to "Literal['strict']" (reportArgumentType)
- /tmp/mypy_primer/projects/pyinstrument/pyinstrument/context_manager.py:40:36 - error: Argument of type "float | str | bool | None" cannot be assigned to parameter "use_timing_thread" of type "bool | None" in function "__init__" (reportArgumentType)
+ /tmp/mypy_primer/projects/pyinstrument/pyinstrument/context_manager.py:40:36 - error: Argument of type "float | str | bool | None" cannot be assigned to parameter "use_timing_thread" of type "bool | None" in function "__init__"
+ Type "float | str | bool | None" is not assignable to type "bool | None"
+ Type "float" is not assignable to type "bool | None"
+ "float" is not assignable to "bool"
+ "float" is not assignable to "None" (reportArgumentType)
graphql-core (https://github.com/graphql-python/graphql-core)
- /tmp/mypy_primer/projects/graphql-core/src/graphql/error/graphql_error.py:139:21 - error: Cannot assign to attribute "path" for class "GraphQLError*" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/error/graphql_error.py:139:21 - error: Cannot assign to attribute "path" for class "GraphQLError*"
+ Type "list[str | int] | Collection[str | int] | None" is not assignable to type "list[str | int] | None"
+ Type "Collection[str | int]" is not assignable to type "list[str | int] | None"
+ "Collection[str | int]" is not assignable to "list[str | int]"
+ "Collection[str | int]" is not assignable to "None" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/graphql-core/src/graphql/error/graphql_error.py:145:22 - error: Cannot assign to attribute "nodes" for class "GraphQLError*" (reportAttributeAccessIssue)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/error/graphql_error.py:145:22 - error: Cannot assign to attribute "nodes" for class "GraphQLError*"
+ Type "Collection[Node] | Node | list[Node] | None" is not assignable to type "list[Node] | None"
+ Type "Node" is not assignable to type "list[Node] | None"
+ "Node" is not assignable to "list[Node]"
+ "Node" is not assignable to "None" (reportAttributeAccessIssue)
- /tmp/mypy_primer/projects/graphql-core/src/graphql/execution/execute.py:1304:21 - error: Argument of type "AwaitableOrValue[dict[str, Any]]" cannot be assigned to parameter "data" of type "dict[str, Any] | None" in function "complete_deferred_fragment_record" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/execution/execute.py:1304:21 - error: Argument of type "AwaitableOrValue[dict[str, Any]]" cannot be assigned to parameter "data" of type "dict[str, Any] | None" in function "complete_deferred_fragment_record"
+ Type "AwaitableOrValue[dict[str, Any]]" is not assignable to type "dict[str, Any] | None"
+ Type "Awaitable[dict[str, Any]]" is not assignable to type "dict[str, Any] | None"
+ "Awaitable[dict[str, Any]]" is not assignable to "dict[str, Any]"
+ "Awaitable[dict[str, Any]]" is not assignable to "None" (reportArgumentType)
- /tmp/mypy_primer/projects/graphql-core/src/graphql/execution/execute.py:1690:81 - error: Argument of type "AwaitableOrValue[dict[str, Any]]" cannot be assigned to parameter "data" of type "dict[str, Any] | None" in function "build_data_response" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/execution/execute.py:1690:81 - error: Argument of type "AwaitableOrValue[dict[str, Any]]" cannot be assigned to parameter "data" of type "dict[str, Any] | None" in function "build_data_response"
+ Type "AwaitableOrValue[dict[str, Any]]" is not assignable to type "dict[str, Any] | None"
+ Type "Awaitable[dict[str, Any]]" is not assignable to type "dict[str, Any] | None"
+ "Awaitable[dict[str, Any]]" is not assignable to "dict[str, Any]"
+ "Awaitable[dict[str, Any]]" is not assignable to "None" (reportArgumentType)
- /tmp/mypy_primer/projects/graphql-core/src/graphql/execution/execute.py:1926:43 - error: Argument of type "Awaitable[AsyncIterable[Any] | ExecutionResult] | AsyncIterable[Any]" cannot be assigned to parameter "result_or_stream" of type "ExecutionResult | AsyncIterable[Any]" in function "map_source_to_response" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/execution/execute.py:1926:43 - error: Argument of type "Awaitable[AsyncIterable[Any] | ExecutionResult] | AsyncIterable[Any]" cannot be assigned to parameter "result_or_stream" of type "ExecutionResult | AsyncIterable[Any]" in function "map_source_to_response"
+ Type "Awaitable[AsyncIterable[Any] | ExecutionResult] | AsyncIterable[Any]" is not assignable to type "ExecutionResult | AsyncIterable[Any]"
+ Type "Awaitable[AsyncIterable[Any] | ExecutionResult]" is not assignable to type "ExecutionResult | AsyncIterable[Any]"
+ "Awaitable[AsyncIterable[Any] | ExecutionResult]" is not assignable to "ExecutionResult"
+ "Awaitable[AsyncIterable[Any] | ExecutionResult]" is incompatible with protocol "AsyncIterable[Any]"
+ "__aiter__" is not present (reportArgumentType)
- /tmp/mypy_primer/projects/graphql-core/src/graphql/language/visitor.py:331:32 - error: Type "((...) -> VisitorAction & TypeForm[VisitorAction]) | None" is not assignable to declared type "(node: Node, *args: Any) -> VisitorAction & TypeForm[VisitorAction]"
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/language/visitor.py:331:32 - error: Type "((...) -> VisitorAction) | None" is not assignable to declared type "(node: Node, *args: Any) -> VisitorAction"
- Type "((...) -> VisitorAction & TypeForm[VisitorAction]) | None" is not assignable to type "(node: Node, *args: Any) -> VisitorAction & TypeForm[VisitorAction]"
+ Type "((...) -> VisitorAction) | None" is not assignable to type "(node: Node, *args: Any) -> VisitorAction"
- Type "None" is not assignable to type "(node: Node, *args: Any) -> VisitorAction & TypeForm[VisitorAction]" (reportAssignmentType)
+ Type "None" is not assignable to type "(node: Node, *args: Any) -> VisitorAction" (reportAssignmentType)
- /tmp/mypy_primer/projects/graphql-core/src/graphql/language/visitor.py:371:33 - error: Type "None" is not assignable to declared type "(node: Node, *args: Any) -> VisitorAction & TypeForm[VisitorAction]"
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/language/visitor.py:371:33 - error: Type "None" is not assignable to declared type "(node: Node, *args: Any) -> VisitorAction"
- Type "None" is not assignable to type "(node: Node, *args: Any) -> VisitorAction & TypeForm[VisitorAction]" (reportAssignmentType)
+ Type "None" is not assignable to type "(node: Node, *args: Any) -> VisitorAction" (reportAssignmentType)
- Attribute "__set__" is unknown
- Attribute "__set__" is unknown
- /tmp/mypy_primer/projects/graphql-core/src/graphql/utilities/extend_schema.py:265:19 - error: Argument of type "GraphQLNamedType | None" cannot be assigned to parameter "query" of type "GraphQLObjectType | None" in function "__init__" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/utilities/extend_schema.py:265:19 - error: Argument of type "GraphQLNamedType | None" cannot be assigned to parameter "query" of type "GraphQLObjectType | None" in function "__init__"
+ Type "GraphQLNamedType | None" is not assignable to type "GraphQLObjectType | None"
+ Type "GraphQLNamedType" is not assignable to type "GraphQLObjectType | None"
+ "GraphQLNamedType" is not assignable to "GraphQLObjectType"
+ "GraphQLNamedType" is not assignable to "None" (reportArgumentType)
- /tmp/mypy_primer/projects/graphql-core/src/graphql/utilities/extend_schema.py:266:22 - error: Argument of type "GraphQLNamedType | None" cannot be assigned to parameter "mutation" of type "GraphQLObjectType | None" in function "__init__" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/utilities/extend_schema.py:266:22 - error: Argument of type "GraphQLNamedType | None" cannot be assigned to parameter "mutation" of type "GraphQLObjectType | None" in function "__init__"
+ Type "GraphQLNamedType | None" is not assignable to type "GraphQLObjectType | None"
+ Type "GraphQLNamedType" is not assignable to type "GraphQLObjectType | None"
+ "GraphQLNamedType" is not assignable to "GraphQLObjectType"
+ "GraphQLNamedType" is not assignable to "None" (reportArgumentType)
- /tmp/mypy_primer/projects/graphql-core/src/graphql/utilities/extend_schema.py:267:26 - error: Argument of type "GraphQLNamedType | None" cannot be assigned to parameter "subscription" of type "GraphQLObjectType | None" in function "__init__" (reportArgumentType)
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/utilities/extend_schema.py:267:26 - error: Argument of type "GraphQLNamedType | None" cannot be assigned to parameter "subscription" of type "GraphQLObjectType | None" in function "__init__"
+ Type "GraphQLNamedType | None" is not assignable to type "GraphQLObjectType | None"
+ Type "GraphQLNamedType" is not assignable to type "GraphQLObjectType | None"
+ "GraphQLNamedType" is not assignable to "GraphQLObjectType"
+ "GraphQLNamedType" is not assignable to "None" (reportArgumentType)
- Type "GraphQLList[Unknown] | GraphQLNonNull[Unknown] | GraphQLNamedType" is not assignable to type "GraphQLNullableType" (reportArgumentType)
+ Type "GraphQLList[Unknown] | GraphQLNonNull[Unknown] | GraphQLNamedType" is not assignable to type "GraphQLNullableType"
+ Type "GraphQLList[Unknown] | GraphQLNonNull[Unknown] | GraphQLNamedType" is not assignable to type "GraphQLNullableType"
+ Type "GraphQLNamedType" is not assignable to type "GraphQLNullableType"
+ "GraphQLNamedType" is not assignable to "GraphQLScalarType"
+ "GraphQLNamedType" is not assignable to "GraphQLObjectType"
+ "GraphQLNamedType" is not assignable to "GraphQLInterfaceType"
+ "GraphQLNamedType" is not assignable to "GraphQLUnionType"
+ "GraphQLNamedType" is not assignable to "GraphQLEnumType"
+ ... (reportArgumentType)
- /tmp/mypy_primer/projects/graphql-core/src/graphql/utilities/print_schema.py:329:22 - error: Argument of type "ConstValueNode & TypeForm[ConstValueNode] | None" cannot be assigned to parameter "ast" of type "Node" in function "print_ast"
+ /tmp/mypy_primer/projects/graphql-core/src/graphql/utilities/print_schema.py:329:22 - error: Argument of type "ConstValueNode | None" cannot be assigned to parameter "ast" of type "Node" in function "print_ast"
- Type "ConstValueNode & TypeForm[ConstValueNode] | None" is not assignable to type "Node"
... (truncated 1 lines) ...
python-htmlgen (https://github.com/srittau/python-htmlgen)
- /tmp/mypy_primer/projects/python-htmlgen/htmlgen/form.py:271:27 - error: Argument of type "str | None" cannot be assigned to parameter "x" of type "ConvertibleToFloat" in function "__new__" (reportArgumentType)
+ /tmp/mypy_primer/projects/python-htmlgen/htmlgen/form.py:271:27 - error: Argument of type "str | None" cannot be assigned to parameter "x" of type "ConvertibleToFloat" in function "__new__"
+ Type "str | None" is not assignable to type "ConvertibleToFloat"
+ Type "None" is not assignable to type "ConvertibleToFloat"
+ "None" is not assignable to "str"
+ "None" is incompatible with protocol "Buffer"
+ "__buffer__" is not present
+ "None" is incompatible with protocol "SupportsFloat"
+ "__float__" is not present
+ "None" is incompatible with protocol "SupportsIndex"
+ ... (reportArgumentType)
bandersnatch (https://github.com/pypa/bandersnatch)
- Parameter 2 type mismatch: base parameter is type "StrOrBytesPath", override parameter is type "PATH_TYPES" (reportIncompatibleMethodOverride)
+ Parameter 2 type mismatch: base parameter is type "StrOrBytesPath", override parameter is type "PATH_TYPES"
+ Type "StrOrBytesPath" is not assignable to type "PATH_TYPES"
+ Type "bytes" is not assignable to type "PATH_TYPES"
+ "bytes" is not assignable to "Path"
+ "bytes" is not assignable to "str" (reportIncompatibleMethodOverride)
- /tmp/mypy_primer/projects/bandersnatch/src/bandersnatch_storage_plugins/swift.py:782:31 - error: Argument of type "str | bytes" cannot be assigned to parameter "initial_value" of type "str | None" in function "__init__" (reportArgumentType)
+ /tmp/mypy_primer/projects/bandersnatch/src/bandersnatch_storage_plugins/swift.py:782:31 - error: Argument of type "str | bytes" cannot be assigned to parameter "initial_value" of type "str | None" in function "__init__"
+ Type "str | bytes" is not assignable to type "str | None"
+ Type "bytes" is not assignable to type "str | None"
+ "bytes" is not assignable to "str"
+ "bytes" is not assignable to "None" (reportArgumentType)
SinbadCogs (https://github.com/mikeshardmind/SinbadCogs)
- /tmp/mypy_primer/projects/SinbadCogs/embedmaker/time_utils.py:53:48 - error: Argument of type "dict[str | None, tzinfo]" cannot be assigned to parameter "tzinfos" of type "_TzInfo & TypeForm[_TzInfo] | None" in function "parse"
+ /tmp/mypy_primer/projects/SinbadCogs/embedmaker/time_utils.py:53:48 - error: Argument of type "dict[str | None, tzinfo]" cannot be assigned to parameter "tzinfos" of type "_TzInfo | None" in function "parse"
- Type "dict[str | None, tzinfo]" is not assignable to type "_TzInfo & TypeForm[_TzInfo] | None"
+ Type "dict[str | None, tzinfo]" is not assignable to type "_TzInfo | None"
- /tmp/mypy_primer/projects/SinbadCogs/rss/core.py:335:16 - error: Type "list[Literal[0]] | None" is not assignable to return type "List[int] | None" (reportReturnType)
+ /tmp/mypy_primer/projects/SinbadCogs/rss/core.py:335:16 - error: Type "list[Literal[0]] | None" is not assignable to return type "List[int] | None"
+ Type "list[Literal[0]] | None" is not assignable to type "List[int] | None"
+ Type "list[Literal[0]]" is not assignable to type "List[int] | None"
+ "list[Literal[0]]" is not assignable to "List[int]"
+ Type parameter "_T@list" is invariant, but "Literal[0]" is not the same as "int"
+ Consider switching from "list" to "Sequence" which is covariant
+ "list[Literal[0]]" is not assignable to "None" (reportReturnType)
- /tmp/mypy_primer/projects/SinbadCogs/rss/core.py:363:35 - error: Argument of type "Unknown | Literal[0]" cannot be assigned to parameter "tzinfo" of type "_TzInfo | None" in function "__new__" (reportArgumentType)
+ /tmp/mypy_primer/projects/SinbadCogs/rss/core.py:363:35 - error: Argument of type "Unknown | Literal[0]" cannot be assigned to parameter "tzinfo" of type "_TzInfo | None" in function "__new__"
+ Type "Unknown | Literal[0]" is not assignable to type "_TzInfo | None"
+ Type "Literal[0]" is not assignable to type "_TzInfo | None"
+ "Literal[0]" is not assignable to "tzinfo"
+ "Literal[0]" is not assignable to "None" (reportArgumentType)
- /tmp/mypy_primer/projects/SinbadCogs/scheduler/time_utils.py:53:48 - error: Argument of type "dict[str | None, tzinfo]" cannot be assigned to parameter "tzinfos" of type "_TzInfo & TypeForm[_TzInfo] | None" in function "parse"
+ /tmp/mypy_primer/projects/SinbadCogs/scheduler/time_utils.py:53:48 - error: Argument of type "dict[str | None, tzinfo]" cannot be assigned to parameter "tzinfos" of type "_TzInfo | None" in function "parse"
- Type "dict[str | None, tzinfo]" is not assignable to type "_TzInfo & TypeForm[_TzInfo] | None"
+ Type "dict[str | None, tzinfo]" is not assignable to type "_TzInfo | None"
black (https://github.com/psf/black)
- /tmp/mypy_primer/projects/black/src/black/files.py:433:16 - error: Type "TextIOWrapper[_WrappedBuffer] | StreamWrapper" is not assignable to return type "TextIOWrapper[_WrappedBuffer] | AnsiToWin32" (reportReturnType)
+ /tmp/mypy_primer/projects/black/src/black/files.py:433:16 - error: Type "TextIOWrapper[_WrappedBuffer] | StreamWrapper" is not assignable to return type "TextIOWrapper[_WrappedBuffer] | AnsiToWin32"
+ Type "TextIOWrapper[_WrappedBuffer] | StreamWrapper" is not assignable to type "TextIOWrapper[_WrappedBuffer] | AnsiToWin32"
+ Type "StreamWrapper" is not assignable to type "TextIOWrapper[_WrappedBuffer] | AnsiToWin32"
+ "StreamWrapper" is not assignable to "TextIOWrapper[_WrappedBuffer]"
+ "StreamWrapper" is not assignable to "AnsiToWin32" (reportReturnType)
mypy (https://github.com/python/mypy)
- /tmp/mypy_primer/projects/mypy/mypy/fastparse.py:2142:17 - error: Argument of type "list[Type] | list[ProperType | None]" cannot be assigned to parameter "args" of type "Sequence[Type] | None" in function "__init__" (reportArgumentType)
+ /tmp/mypy_primer/projects/mypy/mypy/fastparse.py:2142:17 - error: Argument of type "list[Type] | list[ProperType | None]" cannot be assigned to parameter "args" of type "Sequence[Type] | None" in function "__init__"
+ Type "list[Type] | list[ProperType | None]" is not assignable to type "Sequence[Type] | None"
+ Type "list[ProperType | None]" is not assignable to type "Sequence[Type] | None"
+ "list[ProperType | None]" is not assignable to "Sequence[Type]"
+ Type parameter "_T_co@Sequence" is covariant, but "ProperType | None" is not a subtype of "Type"
+ Type "ProperType | None" is not assignable to type "Type"
+ "list[ProperType | None]" is not assignable to "None" (reportArgumentType)
- /tmp/mypy_primer/projects/mypy/mypy/messages.py:830:46 - error: Argument of type "list[Type] | list[ProperType]" cannot be assigned to parameter "types" of type "list[Type | None] | tuple[Type | None, ...]" in function "get_proper_types" (reportArgumentType)
+ /tmp/mypy_primer/projects/mypy/mypy/messages.py:830:46 - error: Argument of type "list[Type] | list[ProperType]" cannot be assigned to parameter "types" of type "list[Type | None] | tuple[Type | None, ...]" in function "get_proper_types"
+ Type "list[Type] | list[ProperType]" is not assignable to type "list[Type | None] | tuple[Type | None, ...]"
+ Type "list[ProperType]" is not assignable to type "list[Type | None] | tuple[Type | None, ...]"
+ "list[ProperType]" is not assignable to "list[Type | None]"
+ Type parameter "_T@list" is invariant, but "ProperType" is not the same as "Type | None"
+ Consider switching from "list" to "Sequence" which is covariant
+ "list[ProperType]" is not assignable to "tuple[Type | None, ...]" (reportArgumentType)
- Attribute "__set__" is unknown
- Attribute "__set__" is unknown
- Type "_Address & TypeForm[_Address] | None" is not assignable to type "Never"
+ Type "_Address | None" is not assignable to type "Never"
- /tmp/mypy_primer/projects/mypy/mypy/typeshed/stdlib/tempfile.pyi:130:21 - error: Type "Overload[(mode: OpenTextMode, buffering: int = -1, encoding: str | None = None, newline: str | None = None, suffix: AnyStr@NamedTemporaryFile | None = None, prefix: AnyStr@NamedTemporaryFile | None = None, dir: GenericPath[AnyStr@NamedTemporaryFile] & TypeForm[GenericPath[AnyStr@NamedTemporaryFile]] | None = None, delete: bool = True, *, errors: str | None = None, delete_on_close: bool = True) -> _TemporaryFileWrapper[str], (mode: OpenBinaryMode = "w+b", buffering: int = -1, encoding: str | None = None, newline: str | None = None, suffix: AnyStr@NamedTemporaryFile | None = None, prefix: AnyStr@NamedTemporaryFile | None = None, dir: GenericPath[AnyStr@NamedTemporaryFile] & TypeForm[GenericPath[AnyStr@NamedTemporaryFile]] | None = None, delete: bool = True, *, errors: str | None = None, delete_on_close: bool = True) -> _TemporaryFileWrapper[bytes], (mode: str = "w+b", buffering: int = -1, encoding: str | None = None, newline: str | None = None, suffix: AnyStr@NamedTemporaryFile | None = None, prefix: AnyStr@NamedTemporaryFile | None = None, dir: GenericPath[AnyStr@NamedTemporaryFile] & TypeForm[GenericPath[AnyStr@NamedTemporaryFile]] | None = None, delete: bool = True, *, errors: str | None = None, delete_on_close: bool = True) -> _TemporaryFileWrapper[Any]]" is not assignable to declared type "Overload[(mode: OpenTextMode, buffering: int = -1, encoding: str | None = None, newline: str | None = None, suffix: AnyStr@TemporaryFile | None = None, prefix: AnyStr@TemporaryFile | None = None, dir: GenericPath[AnyStr@TemporaryFile] & TypeForm[GenericPath[AnyStr@TemporaryFile]] | None = None, *, errors: str | None = None) -> TextIOWrapper[_WrappedBuffer], (mode: OpenBinaryMode, buffering: Literal[0], encoding: str | None = None, newline: str | None = None, suffix: AnyStr@TemporaryFile | None = None, prefix: AnyStr@TemporaryFile | None = None, dir: GenericPath[AnyStr@TemporaryFile] & TypeForm[GenericPath[AnyStr@TemporaryFile]] | None = None, *, errors: str | None = None) -> FileIO, (*, buffering: Literal[0], encoding: str | None = None, newline: str | None = None, suffix: AnyStr@TemporaryFile | None = None, prefix: AnyStr@TemporaryFile | None = None, dir: GenericPath[AnyStr@TemporaryFile] & TypeForm[GenericPath[AnyStr@TemporaryFile]] | None = None, errors: str | None = None) -> FileIO, (mode: OpenBinaryModeWriting, buffering: Literal[-1, 1] = -1, encoding: str | None = None, newline: str | None = None, suffix: AnyStr@TemporaryFile | None = None, prefix: AnyStr@TemporaryFile | None = None, dir: GenericPath[AnyStr@TemporaryFile] & TypeForm[GenericPath[AnyStr@TemporaryFile]] | None = None, *, errors: str | None = None) -> BufferedWriter, (mode: OpenBinaryModeReading, buffering: Literal[-1, 1] = -1, encoding: str | None = None, newline: str | None = None, suffix: AnyStr@TemporaryFile | None = None, prefix: AnyStr@TemporaryFile | None = None, dir: GenericPath[AnyStr@TemporaryFile] & TypeForm[GenericPath[AnyStr@TemporaryFile]] | None = None, *, errors: str | None = None) -> BufferedReader, (mode: OpenBinaryModeUpdating = "w+b", buffering: Literal[-1, 1] = -1, encoding: str | None = None, newline: str | None = None, suffix: AnyStr@TemporaryFile | None = None, prefix: AnyStr@TemporaryFile | None = None, dir: GenericPath[AnyStr@TemporaryFile] & TypeForm[GenericPath[AnyStr@TemporaryFile]] | None = None, *, errors: str | None = None) -> BufferedRandom, (mode: str = "w+b", buffering: int = -1, encoding: str | None = None, newline: str | None = None, suffix: AnyStr@TemporaryFile | None = None, prefix: AnyStr@TemporaryFile | None = None, dir: GenericPath[AnyStr@TemporaryFile] & TypeForm[GenericPath[AnyStr@TemporaryFile]] | None = None, *, errors: str | None = None) -> IO[Any]]"
+ /tmp/mypy_primer/projects/mypy/mypy/typeshed/stdlib/tempfile.pyi:130:21 - error: Type "Overload[(mode: OpenTextMode, buffering: int = -1, encoding: str | None = None, newline: str | None = None, suffix: AnyStr@NamedTemporaryFile | None = None, prefix: AnyStr@NamedTemporaryFile | None = None, dir: GenericPath[AnyStr@NamedTemporaryFile] | None = None, delete: bool = True, *, errors: str | None = None, delete_on_close: bool = True) -> _TemporaryFileWrapper[str], (mode: OpenBinaryMode = "w+b", buffering: int = -1, encoding: str | None = None, newline: str | None = None, suffix: AnyStr@NamedTemporaryFile | None = None, prefix: AnyStr@NamedTemporaryFile | None = None, dir: GenericPath[AnyStr@NamedTemporaryFile] | None = None, delete: bool = True, *, errors: str | None = None, delete_on_close: bool = True) -> _TemporaryFileWrapper[bytes], (mode: str = "w+b", buffering: int = -1, encoding: str | None = None, newline: str | None = None, suffix: AnyStr@NamedTemporaryFile | None = None, prefix: AnyStr@NamedTemporaryFile | None = None, dir: GenericPath[AnyStr@NamedTemporaryFile] | None = None, delete: bool = True, *, errors: str | None = None, delete_on_close: bool = True) -> _TemporaryFileWrapper[Any]]" is not assignable to declared type "Overload[(mode: OpenTextMode, buffering: int = -1, encoding: str | None = None, newline: str | None = None, suffix: AnyStr@TemporaryFile | None = None, prefix: AnyStr@TemporaryFile | None = None, dir: GenericPath[AnyStr@TemporaryFile] | None = None, *, errors: str | None = None) -> TextIOWrapper[_WrappedBuffer], (mode: OpenBinaryMode, buffering: Literal[0], encoding: str | None = None, newline: str | None = None, suffix: AnyStr@TemporaryFile | None = None, prefix: AnyStr@TemporaryFile | None = None, dir: GenericPath[AnyStr@TemporaryFile] | None = None, *, errors: str | None = None) -> FileIO, (*, buffering: Literal[0], encoding: str | None = None, newline: str | None = None, suffix: AnyStr@TemporaryFile | None = None, prefix: AnyStr@TemporaryFile | None = None, dir: GenericPath[AnyStr@TemporaryFile] | None = None, errors: str | None = None) -> FileIO, (mode: OpenBinaryModeWriting, buffering: Literal[-1, 1] = -1, encoding: str | None = None, newline: str | None = None, suffix: AnyStr@TemporaryFile | None = None, prefix: AnyStr@TemporaryFile | None = None, dir: GenericPath[AnyStr@TemporaryFile] | None = None, *, errors: str | None = None) -> BufferedWriter, (mode: OpenBinaryModeReading, buffering: Literal[-1, 1] = -1, encoding: str | None = None, newline: str | None = None, suffix: AnyStr@TemporaryFile | None = None, prefix: AnyStr@TemporaryFile | None = None, dir: GenericPath[AnyStr@TemporaryFile] | None = None, *, errors: str | None = None) -> BufferedReader, (mode: OpenBinaryModeUpdating = "w+b", buffering: Literal[-1, 1] = -1, encoding: str | None = None, newline: str | None = None, suffix: AnyStr@TemporaryFile | None = None, prefix: AnyStr@TemporaryFile | None = None, dir: GenericPath[AnyStr@TemporaryFile] | None = None, *, errors: str | None = None) -> BufferedRandom, (mode: str = "w+b", buffering: int = -1, encoding: str | None = None, newline: str | None = None, suffix: AnyStr@TemporaryFile | None = None, prefix: AnyStr@TemporaryFile | None = None, dir: GenericPath[AnyStr@TemporaryFile] | None = None, *, errors: str | None = None) -> IO[Any]]"
- No overloaded function matches type "(mode: OpenTextMode, buffering: int = -1, encoding: str | None = None, newline: str | None = None, suffix: AnyStr@TemporaryFile | None = None, prefix: AnyStr@TemporaryFile | None = None, dir: GenericPath[AnyStr@TemporaryFile] & TypeForm[GenericPath[AnyStr@TemporaryFile]] | None = None, *, errors: str | None = None) -> TextIOWrapper[_WrappedBuffer]" (reportAssignmentType)
... (truncated 39 lines) ...
artigraph (https://github.com/artigraph/artigraph)
+ /tmp/mypy_primer/projects/artigraph/src/arti/internal/type_hints.py:50:8 - error: Unnecessary isinstance call; "type" is never an instance of "TypeVar" (reportUnnecessaryIsInstance)
- /tmp/mypy_primer/projects/artigraph/src/arti/internal/type_hints.py:67:34 - error: Argument of type "ParamSpec | Any" cannot be assigned to parameter "class_or_tuple" of type "_ClassInfo" in function "issubclass" (reportArgumentType)
+ /tmp/mypy_primer/projects/artigraph/src/arti/internal/type_hints.py:67:34 - error: Argument of type "ParamSpec | Any" cannot be assigned to parameter "class_or_tuple" of type "_ClassInfo" in function "issubclass"
+ Type "ParamSpec | Any" is not assignable to type "_ClassInfo"
+ Type "ParamSpec" is not assignable to type "_ClassInfo"
+ "ParamSpec" is not assignable to "type"
... (truncated 4776 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 #670