Skip to content
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

Update to 2.0.4 #20

Merged
merged 39 commits into from
Aug 16, 2023
Merged

Update to 2.0.4 #20

merged 39 commits into from
Aug 16, 2023

Conversation

jackyzha0
Copy link
Member

No description provided.

erictraut and others added 30 commits August 7, 2023 16:06
… statement introduced in PEP 695. This addresses #5662. (#5663)

Co-authored-by: Eric Traut <[email protected]>
…ing bidirectional type inference when the expected type includes a protocol that is specialized with a literal type argument. This addresses microsoft/pyright#5636. (#5665)

Co-authored-by: Eric Traut <[email protected]>
…tain cases where the declared type includes a type argument with an `Any` and the assigned type does not. This addresses #5628. (#5671)

Co-authored-by: Eric Traut <[email protected]>
… union of types that use invariant type parameters to a protocol that uses a covariant type parameter. This addresses #5673. (#5675)

Co-authored-by: Eric Traut <[email protected]>
…to a variable with a type annotation was used within a loop. This addresses microsoft/pylance-release#4706.
…te and led to a crash. This addresses #5622. (#5702)

Co-authored-by: Eric Traut <[email protected]>
…ction that has no type annotations. It was using call-site return type inference but failing to wrap the result in a `Coroutine`. This addresses #5705.
* Support zip imports from .jar extensions

* Remove extra line

* Remove OrEgg from ZipOrEgg functions

---------

Co-authored-by: Eric Traut <[email protected]>
…us operator) is used in a `yield` or `yield from` statement without a parenthesis. This addresses microsoft/pyright#5709.
…ositive error) when a binary operator overload method was annotated to return `NoReturn`. This addresses #5711. (#5712)

Co-authored-by: Eric Traut <[email protected]>
…he declaration name node rather than the full declaration node.
…the two-parameter form of the `get` method for `dict` and `TypedDict` that may result in visible type evaluation changes in some code bases.
…tive errors." (#5723)

This reverts commit 2a09686.

Co-authored-by: Eric Traut <[email protected]>
…rison` error when the subject of a `match `statement was mutated in a loop. This addresses microsoft/pyright#5717.
…are apparently not treated as enumerated types. This addresses microsoft/pyright#5721.
…fter much discussion (see python/cpython#30969), it has been decided to support this even though a strict reading of PEP 612 seems to exclude it. This addresses microsoft/pyright#5715.
…literal expression to a TypeVar bound to a TypedDict. This addresses microsoft/pyright#5708.
…propriately in certain cases. This addresses #5710. (#5727)

Co-authored-by: Eric Traut <[email protected]>
…h with a NamedTuple. Fields in a NamedTuple are implicitly read-only, so a writable protocol should not match. This addresses #5683.
…ard import. This addresses #5704. (#5728)

Co-authored-by: Eric Traut <[email protected]>
erictraut and others added 9 commits August 15, 2023 14:30
…g as the index is positive and falls within a determinate portion. This addresses #5726. (#5729)

Co-authored-by: Eric Traut <[email protected]>
…ttern when `A` has the type `type`. This addresses #5714.
…ypeVar to annotate its parameter. The variance of the TypeVar shouldn't be checked in this case, whereas it should be for the method. This addresses #5687.
…perty` defined on an enum. This addresses #5696.
…be preferred over a local module if the site-packages package is "py.typed". This addresses #5719.
…`super` call used `type` as the first argument. This addresses #5685.
@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

spack (https://github.com/spack/spack)
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/fetch_strategy.py:302:27 - error: Operator "+" not supported for types "Literal['URL does not exist: ']" and "Unknown | None"
-     Operator "+" not supported for types "Literal['URL does not exist: ']" and "None" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/fetch_strategy.py:385:56 - error: Argument of type "Unknown | Any | Literal[0] | None" cannot be assigned to parameter "timeout" of type "int" in function "base_curl_fetch_args"
-     Type "Unknown | Any | Literal[0] | None" cannot be assigned to type "int"
-       Type "None" cannot be assigned to type "int" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/fetch_strategy.py:762:47 - error: Argument of type "list[str | bytes | Unknown]" cannot be assigned to parameter "__iterable" of type "Iterable[str]" in function "join"
-     "bytes" is incompatible with "str" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/fetch_strategy.py:812:32 - error: Argument of type "list[Unknown | None]" cannot be assigned to parameter "__iterable" of type "Iterable[str]" in function "extend"
-     Type "Unknown | None" cannot be assigned to type "str"
-       Type "None" cannot be assigned to type "str" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/fetch_strategy.py:939:30 - error: "startswith" is not a known member of "None" (pyright[reportOptionalMemberAccess])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/fetch_strategy.py:939:64 - error: "startswith" is not a known member of "None" (pyright[reportOptionalMemberAccess])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/fetch_strategy.py:868:30 - error: Argument of type "list[Unknown | None]" cannot be assigned to parameter "__iterable" of type "Iterable[str]" in function "extend"
-     Type "Unknown | None" cannot be assigned to type "str"
-       Type "None" cannot be assigned to type "str" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/fetch_strategy.py:895:44 - error: "Literal[True]" is not iterable
-     "__iter__" method not defined (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/fetch_strategy.py:1004:29 - error: "split" is not a known member of "None" (pyright[reportOptionalMemberAccess])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/fetch_strategy.py:1025:36 - error: "split" is not a known member of "None" (pyright[reportOptionalMemberAccess])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/fetch_strategy.py:1108:47 - error: Argument of type "list[str | bytes]" cannot be assigned to parameter "__iterable" of type "Iterable[str]" in function "join"
-     "bytes" is incompatible with "str" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/fetch_strategy.py:1122:22 - error: Argument of type "list[Unknown | None]" cannot be assigned to parameter "__iterable" of type "Iterable[str]" in function "extend"
-     Type "Unknown | None" cannot be assigned to type "str"
-       Type "None" cannot be assigned to type "str" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/fetch_strategy.py:1219:46 - error: Argument of type "list[str | bytes | Unknown]" cannot be assigned to parameter "__iterable" of type "Iterable[str]" in function "join"
-     "bytes" is incompatible with "str" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/fetch_strategy.py:1241:22 - error: Argument of type "list[Unknown | None]" cannot be assigned to parameter "__iterable" of type "Iterable[str]" in function "extend"
-     Type "Unknown | None" cannot be assigned to type "str"
-       Type "None" cannot be assigned to type "str" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/spec.py:4559:26 - error: Object of type "Literal[True]" is not callable (pyright[reportGeneralTypeIssues])
-     Type "Unknown | None" cannot be assigned to type "str"
-       Type "None" cannot be assigned to type "str" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/stage.py:390:62 - error: Argument of type "Unknown | None" cannot be assigned to parameter "url" of type "str" in function "default_download_filename"
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/cmd/config.py:443:17 - error: Argument of type "LiteralString" cannot be assigned to parameter "__value" of type "list[Any]" in function "__setitem__"
-     "str" is incompatible with "list[Any]" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/test/url_fetch.py:199:33 - error: Argument of type "Unknown | None" cannot be assigned to parameter "p" of type "AnyOrLiteralStr@basename" in function "basename"
-     Type "Unknown | None" is incompatible with constrained type variable "AnyOrLiteralStr" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/test/url_fetch.py:234:33 - error: Argument of type "Unknown | None" cannot be assigned to parameter "p" of type "AnyOrLiteralStr@basename" in function "basename"
-     Type "Unknown | None" is incompatible with constrained type variable "AnyOrLiteralStr" (pyright[reportGeneralTypeIssues])
-         Type parameter "_T_co@SupportsRead" is covariant, but "bytes | str" is not a subtype of "bytes" (pyright[reportGeneralTypeIssues])
+         "read" is an incompatible type
+           Type "(__n: int = -1, /) -> str" cannot be assigned to type "(__length: int = ..., /) -> _T_co@SupportsRead"
+             Function return type "str" is incompatible with type "_T_co@SupportsRead" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/util/executable.py:252:25 - error: "close" is not a known member of "None" (pyright[reportOptionalMemberAccess])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/util/executable.py:254:25 - error: "close" is not a known member of "None" (pyright[reportOptionalMemberAccess])
-   /tmp/mypy_primer/projects/spack/lib/spack/spack/util/executable.py:256:25 - error: "close" is not a known member of "None" (pyright[reportOptionalMemberAccess])
- 3638 errors, 49 warnings, 0 informations 
+ 3616 errors, 49 warnings, 0 informations 

bidict (https://github.com/jab/bidict)
-     "Generator[tuple[KT@iteritems_mapping_or_iterable, VT@iteritems_mapping_or_iterable] | tuple[tuple[KT@iteritems_mapping_or_iterable, VT@iteritems_mapping_or_iterable], Unknown]]" is incompatible with "ItemsIter[KT@iteritems_mapping_or_iterable, VT@iteritems_mapping_or_iterable]"
+     "Generator[tuple[KT@iteritems_mapping_or_iterable, VT@iteritems_mapping_or_iterable] | tuple[tuple[KT@iteritems_mapping_or_iterable, VT@iteritems_mapping_or_iterable], Unknown], Unknown, Unknown]" is incompatible with "ItemsIter[KT@iteritems_mapping_or_iterable, VT@iteritems_mapping_or_iterable]"

Tanjun (https://github.com/FasterSpeeding/Tanjun)
-     Type of "get" is "Overload[(__key: str, /) -> (Unknown | None), (__key: str, __default: Unknown | _T@get, /) -> (Unknown | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Overload[(__key: str, /) -> (Unknown | None), (__key: str, __default: Unknown, /) -> Unknown, (__key: str, __default: _T@get, /) -> (Unknown | _T@get)]" (pyright[reportUnknownMemberType])
-     Type of "get" is "Overload[(__key: str, /) -> (Unknown | None), (__key: str, /, default: Unknown | _T@get) -> (Unknown | _T@get)] | Overload[(__key: str, /) -> (Unknown | None), (__key: str, __default: Unknown | _T@get, /) -> (Unknown | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Overload[(__key: str, /) -> (Unknown | None), (__key: str, /, default: Unknown | _T@get) -> (Unknown | _T@get)] | Overload[(__key: str, /) -> (Unknown | None), (__key: str, __default: Unknown, /) -> Unknown, (__key: str, __default: _T@get, /) -> (Unknown | _T@get)]" (pyright[reportUnknownMemberType])
-     Type of "get" is "Overload[(__key: str, /) -> (Unknown | None), (__key: str, __default: Unknown | _T@get, /) -> (Unknown | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Overload[(__key: str, /) -> (Unknown | None), (__key: str, __default: Unknown, /) -> Unknown, (__key: str, __default: _T@get, /) -> (Unknown | _T@get)]" (pyright[reportUnknownMemberType])
-     Type of "get" is "Overload[(__key: str, /) -> (Unknown | None), (__key: str, /, default: Unknown | _T@get) -> (Unknown | _T@get)] | Overload[(__key: str, /) -> (Unknown | None), (__key: str, __default: Unknown | _T@get, /) -> (Unknown | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Overload[(__key: str, /) -> (Unknown | None), (__key: str, /, default: Unknown | _T@get) -> (Unknown | _T@get)] | Overload[(__key: str, /) -> (Unknown | None), (__key: str, __default: Unknown, /) -> Unknown, (__key: str, __default: _T@get, /) -> (Unknown | _T@get)]" (pyright[reportUnknownMemberType])
-     Type of "get" is "Overload[(__key: str, /) -> (Unknown | None), (__key: str, __default: Unknown | _T@get, /) -> (Unknown | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Overload[(__key: str, /) -> (Unknown | None), (__key: str, __default: Unknown, /) -> Unknown, (__key: str, __default: _T@get, /) -> (Unknown | _T@get)]" (pyright[reportUnknownMemberType])
-     Type of "get" is "Overload[(__key: str, /) -> (Unknown | None), (__key: str, /, default: Unknown | _T@get) -> (Unknown | _T@get)] | Overload[(__key: str, /) -> (Unknown | None), (__key: str, __default: Unknown | _T@get, /) -> (Unknown | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Overload[(__key: str, /) -> (Unknown | None), (__key: str, /, default: Unknown | _T@get) -> (Unknown | _T@get)] | Overload[(__key: str, /) -> (Unknown | None), (__key: str, __default: Unknown, /) -> Unknown, (__key: str, __default: _T@get, /) -> (Unknown | _T@get)]" (pyright[reportUnknownMemberType])
-     Type of "get" is "Overload[(__key: tuple[Unknown, str], /) -> (AppCommand[Any] | None), (__key: tuple[Unknown, str], __default: AppCommand[Any] | _T@get, /) -> (AppCommand[Any] | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Overload[(__key: tuple[Unknown, str], /) -> (AppCommand[Any] | None), (__key: tuple[Unknown, str], __default: AppCommand[Any], /) -> AppCommand[Any], (__key: tuple[Unknown, str], __default: _T@get, /) -> (AppCommand[Any] | _T@get)]" (pyright[reportUnknownMemberType])
-     Type of "pop" is "Overload[(__key: (Any, ...) -> Coroutine[Any, Any, None], /) -> Unknown, (__key: (Any, ...) -> Coroutine[Any, Any, None], __default: Unknown | _T@pop, /) -> (Unknown | _T@pop)]" (pyright[reportUnknownMemberType])
+     Type of "pop" is "Overload[(__key: (Any, ...) -> Coroutine[Any, Any, None], /) -> Unknown, (__key: (Any, ...) -> Coroutine[Any, Any, None], __default: Unknown, /) -> Unknown, (__key: (Any, ...) -> Coroutine[Any, Any, None], __default: _T@pop, /) -> (Unknown | _T@pop)]" (pyright[reportUnknownMemberType])
-     Type of "get" is "Overload[(__key: tuple[Unknown, str], /) -> (MenuCommand[Any, Any] | None), (__key: tuple[Unknown, str], __default: MenuCommand[Any, Any] | _T@get, /) -> (MenuCommand[Any, Any] | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Overload[(__key: tuple[Unknown, str], /) -> (MenuCommand[Any, Any] | None), (__key: tuple[Unknown, str], __default: MenuCommand[Any, Any], /) -> MenuCommand[Any, Any], (__key: tuple[Unknown, str], __default: _T@get, /) -> (MenuCommand[Any, Any] | _T@get)]" (pyright[reportUnknownMemberType])
-     Type of "get" is "Overload[(__key: tuple[Unknown, str], /) -> (MenuCommand[Any, Any] | None), (__key: tuple[Unknown, str], __default: MenuCommand[Any, Any] | _T@get, /) -> (MenuCommand[Any, Any] | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Overload[(__key: tuple[Unknown, str], /) -> (MenuCommand[Any, Any] | None), (__key: tuple[Unknown, str], __default: MenuCommand[Any, Any], /) -> MenuCommand[Any, Any], (__key: tuple[Unknown, str], __default: _T@get, /) -> (MenuCommand[Any, Any] | _T@get)]" (pyright[reportUnknownMemberType])
-     Type of "get" is "Overload[(__key: Unknown, /) -> (str | None), (__key: Unknown, __default: str | _T@get, /) -> (str | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Overload[(__key: Unknown, /) -> (str | None), (__key: Unknown, __default: str, /) -> str, (__key: Unknown, __default: _T@get, /) -> (str | _T@get)]" (pyright[reportUnknownMemberType])
-     Type of "get" is "Overload[(__key: str, /) -> (Unknown | None), (__key: str, __default: Unknown | _T@get, /) -> (Unknown | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Overload[(__key: str, /) -> (Unknown | None), (__key: str, __default: Unknown, /) -> Unknown, (__key: str, __default: _T@get, /) -> (Unknown | _T@get)]" (pyright[reportUnknownMemberType])
+   /tmp/mypy_primer/projects/Tanjun/tanjun/context/slash.py:979:53 - error: Type variable "_T" has no meaning in this context (pyright[reportGeneralTypeIssues])
-     Type of "get" is "Overload[(__key: Unknown, /) -> (_InnerResourceT@_FlatResource | None), (__key: Unknown, __default: _InnerResourceT@_FlatResource | _T@get, /) -> (_InnerResourceT@_FlatResource | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Overload[(__key: Unknown, /) -> (_InnerResourceT@_FlatResource | None), (__key: Unknown, __default: _InnerResourceT@_FlatResource, /) -> _InnerResourceT@_FlatResource, (__key: Unknown, __default: _T@get, /) -> (_InnerResourceT@_FlatResource | _T@get)]" (pyright[reportUnknownMemberType])
-     Type of "get" is "Overload[(__key: Unknown, /) -> (_InnerResourceT@_FlatResource | None), (__key: Unknown, __default: _InnerResourceT@_FlatResource | _T@get, /) -> (_InnerResourceT@_FlatResource | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Overload[(__key: Unknown, /) -> (_InnerResourceT@_FlatResource | None), (__key: Unknown, __default: _InnerResourceT@_FlatResource, /) -> _InnerResourceT@_FlatResource, (__key: Unknown, __default: _T@get, /) -> (_InnerResourceT@_FlatResource | _T@get)]" (pyright[reportUnknownMemberType])
-     Type of "get" is "Overload[(__key: Unknown, /) -> (_InnerResourceT@_MemberResource | None), (__key: Unknown, __default: _InnerResourceT@_MemberResource | _T@get, /) -> (_InnerResourceT@_MemberResource | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Overload[(__key: Unknown, /) -> (_InnerResourceT@_MemberResource | None), (__key: Unknown, __default: _InnerResourceT@_MemberResource, /) -> _InnerResourceT@_MemberResource, (__key: Unknown, __default: _T@get, /) -> (_InnerResourceT@_MemberResource | _T@get)]" (pyright[reportUnknownMemberType])
-     Type of "get" is "Overload[(__key: Unknown, /) -> (dict[Unknown, _InnerResourceT@_MemberResource] | None), (__key: Unknown, __default: dict[Unknown, _InnerResourceT@_MemberResource] | _T@get, /) -> (dict[Unknown, _InnerResourceT@_MemberResource] | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Overload[(__key: Unknown, /) -> (dict[Unknown, _InnerResourceT@_MemberResource] | None), (__key: Unknown, __default: dict[Unknown, _InnerResourceT@_MemberResource], /) -> dict[Unknown, _InnerResourceT@_MemberResource], (__key: Unknown, __default: _T@get, /) -> (dict[Unknown, _InnerResourceT@_MemberResource] | _T@get)]" (pyright[reportUnknownMemberType])
-     Type of "get" is "Overload[(__key: Unknown, /) -> (_InnerResourceT@_MemberResource | None), (__key: Unknown, __default: _InnerResourceT@_MemberResource | _T@get, /) -> (_InnerResourceT@_MemberResource | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Overload[(__key: Unknown, /) -> (_InnerResourceT@_MemberResource | None), (__key: Unknown, __default: _InnerResourceT@_MemberResource, /) -> _InnerResourceT@_MemberResource, (__key: Unknown, __default: _T@get, /) -> (_InnerResourceT@_MemberResource | _T@get)]" (pyright[reportUnknownMemberType])
-     Type of "get" is "Overload[(__key: Unknown, /) -> (_InnerResourceT@_MemberResource | None), (__key: Unknown, __default: _InnerResourceT@_MemberResource | _T@get, /) -> (_InnerResourceT@_MemberResource | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Overload[(__key: Unknown, /) -> (_InnerResourceT@_MemberResource | None), (__key: Unknown, __default: _InnerResourceT@_MemberResource, /) -> _InnerResourceT@_MemberResource, (__key: Unknown, __default: _T@get, /) -> (_InnerResourceT@_MemberResource | _T@get)]" (pyright[reportUnknownMemberType])
-     Type of "get" is "Overload[(__key: Unknown, /) -> (dict[Unknown, _InnerResourceT@_MemberResource] | None), (__key: Unknown, __default: dict[Unknown, _InnerResourceT@_MemberResource] | _T@get, /) -> (dict[Unknown, _InnerResourceT@_MemberResource] | _T@get)]" (pyright[reportUnknownMemberType])

... (truncated 5 lines) ...

steam.py (https://github.com/Gobot1234/steam.py)
-   /tmp/mypy_primer/projects/steam.py/examples/wallet.py:1:8 - warning: Import "babel.numbers" could not be resolved from source (pyright[reportMissingModuleSource])
+   /tmp/mypy_primer/projects/steam.py/examples/wallet.py:1:8 - error: Import "babel.numbers" could not be resolved (pyright)
+   /tmp/mypy_primer/projects/steam.py/examples/wallet.py:11:30 - error: Type of "numbers" is unknown (pyright[reportUnknownMemberType])
+   /tmp/mypy_primer/projects/steam.py/examples/wallet.py:11:30 - error: Type of "get_currency_precision" is unknown (pyright[reportUnknownMemberType])
+   /tmp/mypy_primer/projects/steam.py/examples/wallet.py:14:9 - error: Type of "numbers" is unknown (pyright[reportUnknownMemberType])
+   /tmp/mypy_primer/projects/steam.py/examples/wallet.py:14:9 - error: Type of "format_currency" is unknown (pyright[reportUnknownMemberType])
+   /tmp/mypy_primer/projects/steam.py/examples/wallet.py:35:25 - error: Type of "numbers" is unknown (pyright[reportUnknownMemberType])
+   /tmp/mypy_primer/projects/steam.py/examples/wallet.py:35:25 - error: Type of "format_currency" is unknown (pyright[reportUnknownMemberType])
-     Type of "get" is "Unknown | Overload[(__key: str, /) -> (Any | None), (__key: str, __default: Any | _T@get, /) -> (Any | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Unknown | Overload[(__key: str, /) -> (Any | None), (__key: str, __default: Any, /) -> Any, (__key: str, __default: _T@get, /) -> (Any | _T@get)]" (pyright[reportUnknownMemberType])
-     Type of "get" is "Unknown | Overload[(__key: str, /) -> (Any | None), (__key: str, __default: Any | _T@get, /) -> (Any | _T@get)]" (pyright[reportUnknownMemberType])
+     Type of "get" is "Unknown | Overload[(__key: str, /) -> (Any | None), (__key: str, __default: Any, /) -> Any, (__key: str, __default: _T@get, /) -> (Any | _T@get)]" (pyright[reportUnknownMemberType])
+   /tmp/mypy_primer/projects/steam.py/steam/manifest.py:766:9 - error: "id" overrides symbol of same name in class "ManifestInfo"
+     "CachedSlotProperty[Self@PrivateManifestInfo, ManifestID]" is incompatible with "ManifestID" (pyright[reportIncompatibleVariableOverride])
+   /tmp/mypy_primer/projects/steam.py/steam/manifest.py:765:30 - warning: Unnecessary "# type: ignore" comment (pyright)
- 8182 errors, 30 warnings, 0 informations 
+ 8190 errors, 30 warnings, 0 informations 

freqtrade (https://github.com/freqtrade/freqtrade)
-   /tmp/mypy_primer/projects/freqtrade/freqtrade/edge/edge_positioning.py:67:37 - error: Cannot assign member "_allowed_risk" for type "Edge"
-     Type "Any | None" cannot be assigned to type "float"
-       Type "None" cannot be assigned to type "float" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/freqtrade/freqtrade/edge/edge_positioning.py:101:17 - error: Operator "+" not supported for types "int" and "Any | None"
-     Operator "+" not supported for types "int" and "None" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/freqtrade/freqtrade/exchange/exchange.py:405:21 - error: Operator ">" not supported for "None" (pyright[reportOptionalOperand])
-   /tmp/mypy_primer/projects/freqtrade/freqtrade/freqai/data_kitchen.py:578:53 - error: Cannot access member "get" for type "str"
-     Member "get" is unknown (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/freqtrade/freqtrade/freqai/freqai_interface.py:92:32 - error: Argument of type "Any | None" cannot be assigned to parameter "__obj" of type "Sized" in function "len"
-     Type "Any | None" cannot be assigned to type "Sized"
-       "__len__" is not present (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/freqtrade/freqtrade/freqai/freqai_interface.py:761:26 - error: Argument of type "Any | None" cannot be assigned to parameter "iterable" of type "Iterable[_T@deque]" in function "__init__"
-     Type "Any | None" cannot be assigned to type "Iterable[_T@deque]"
-       "__iter__" is not present (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/freqtrade/freqtrade/freqai/freqai_interface.py:768:16 - error: Operator "in" not supported for types "str" and "Any | None"
-     Operator "in" not supported for types "str" and "None" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/freqtrade/freqtrade/freqai/freqai_interface.py:770:21 - error: Object of type "None" cannot be used as iterable value (pyright[reportOptionalIterable])
-   /tmp/mypy_primer/projects/freqtrade/freqtrade/optimize/backtesting.py:1246:66 - error: Argument of type "Dict[str, Tuple[Unknown, ...]]" cannot be assigned to parameter "data" of type "Dict[str, List[Tuple[Unknown, ...]]]" in function "handle_left_open"
-     "Dict[str, Tuple[Unknown, ...]]" is incompatible with "Dict[str, List[Tuple[Unknown, ...]]]"
-       Type parameter "_VT@dict" is invariant, but "Tuple[Unknown, ...]" is not the same as "List[Tuple[Unknown, ...]]" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/freqtrade/freqtrade/optimize/optimize_reports/bt_output.py:338:54 - error: Argument of type "Any | None" cannot be assigned to parameter "exit_reason_stats" of type "List[Dict[str, Any]]" in function "text_table_exit_reason"
-     Type "Any | None" cannot be assigned to type "List[Dict[str, Any]]"
-       Type "None" cannot be assigned to type "List[Dict[str, Any]]" (pyright[reportGeneralTypeIssues])
- 563 errors, 37 warnings, 0 informations 
+ 553 errors, 37 warnings, 0 informations 

pyinstrument (https://github.com/joerick/pyinstrument)
-   /tmp/mypy_primer/projects/pyinstrument/test/test_profiler_async.py:8:8 - error: Import "greenlet" could not be resolved (pyright)
+   /tmp/mypy_primer/projects/pyinstrument/test/test_profiler_async.py:8:8 - warning: Import "greenlet" could not be resolved from source (pyright[reportMissingModuleSource])
- 32 errors, 4 warnings, 0 informations 
+ 31 errors, 5 warnings, 0 informations 

Expression (https://github.com/cognitedata/Expression)
+ /tmp/mypy_primer/projects/Expression/expression/collections/map.py
+   /tmp/mypy_primer/projects/Expression/expression/collections/map.py:215:9 - error: "__hash__" overrides symbol of same name in class "Mapping"
+     Type cannot be assigned to type "None" (pyright[reportIncompatibleVariableOverride])
+   /tmp/mypy_primer/projects/Expression/expression/collections/map.py:215:9 - error: Instance variable "__hash__" overrides class variable of same name in class "Mapping" (pyright[reportIncompatibleVariableOverride])
+   /tmp/mypy_primer/projects/Expression/tests/test_catch.py:98:29 - error: Return type of generator function must be compatible with "Generator[str, Any, Any]"
+     "Generator[str, str, Unknown]" is incompatible with "Generator[str, None, str]"
+       Type parameter "_SendT_contra@Generator" is contravariant, but "str" is not a supertype of "None" (pyright[reportGeneralTypeIssues])
- 278 errors, 0 warnings, 0 informations 
+ 281 errors, 0 warnings, 0 informations 

dd-trace-py (https://github.com/DataDog/dd-trace-py): typechecking got 1.29x faster (72.3s -> 55.9s)
(Performance measurements are based on a single noisy sample)
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/tracer.py:700:46 - error: Argument of type "str | Unknown | None" cannot be assigned to parameter "__key" of type "str" in function "get"
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/tracer.py:700:46 - error: Argument of type "str | None" cannot be assigned to parameter "__key" of type "str" in function "get"
-     Type "str | Unknown | None" cannot be assigned to type "str"
+     Type "str | None" cannot be assigned to type "str"
- /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/http.py
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/http.py:23:26 - error: Cannot assign member "_base_path" for type "BasePathMixin"
-     Type "Unknown | None" cannot be assigned to type "str"
-       Type "None" cannot be assigned to type "str" (pyright[reportGeneralTypeIssues])
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/uwsgi.py:25:16 - warning: Import "uwsgi" could not be resolved from source (pyright[reportMissingModuleSource])
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/uwsgi.py:50:24 - error: Import "uwsgidecorators" could not be resolved (pyright)
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/uwsgi.py:50:24 - warning: Import "uwsgidecorators" could not be resolved from source (pyright[reportMissingModuleSource])
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/uwsgi.py:29:18 - error: "opt" is not a known member of module "uwsgi" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/uwsgi.py:39:14 - error: "numproc" is not a known member of module "uwsgi" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/uwsgi.py:39:40 - error: "opt" is not a known member of module "uwsgi" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/uwsgi.py:39:71 - error: "worker_id" is not a known member of module "uwsgi" (pyright[reportGeneralTypeIssues])
-   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/uwsgi.py:41:22 - error: "opt" is not a known member of module "uwsgi" (pyright[reportGeneralTypeIssues])
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/datadog/profiling/ddup.py:2:24 - error: Import symbol "init" has type "(env: str | None, service: str | None, version: str | None, tags: Dict[str, str] | None, max_nframes: int | None, url: str | None) -> None", which cannot be assigned to declared type "None"
+     Type cannot be assigned to type "None" (pyright[reportGeneralTypeIssues])
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/datadog/profiling/ddup.py:2:24 - error: Import symbol "start_sample" has type "(nframes: int) -> None", which cannot be assigned to declared type "None"
+     Type cannot be assigned to type "None" (pyright[reportGeneralTypeIssues])
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/datadog/profiling/ddup.py:2:24 - error: Import symbol "push_cputime" has type "(value: int, count: int) -> None", which cannot be assigned to declared type "None"
+     Type cannot be assigned to type "None" (pyright[reportGeneralTypeIssues])
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/datadog/profiling/ddup.py:2:24 - error: Import symbol "push_walltime" has type "(value: int, count: int) -> None", which cannot be assigned to declared type "None"
+     Type cannot be assigned to type "None" (pyright[reportGeneralTypeIssues])
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/datadog/profiling/ddup.py:2:24 - error: Import symbol "push_acquire" has type "(value: int, count: int) -> None", which cannot be assigned to declared type "None"
+     Type cannot be assigned to type "None" (pyright[reportGeneralTypeIssues])
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/datadog/profiling/ddup.py:2:24 - error: Import symbol "push_release" has type "(value: int, count: int) -> None", which cannot be assigned to declared type "None"
+     Type cannot be assigned to type "None" (pyright[reportGeneralTypeIssues])
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/datadog/profiling/ddup.py:2:24 - error: Import symbol "push_alloc" has type "(value: int, count: int) -> None", which cannot be assigned to declared type "None"
+     Type cannot be assigned to type "None" (pyright[reportGeneralTypeIssues])
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/datadog/profiling/ddup.py:2:24 - error: Import symbol "push_heap" has type "(value: int) -> None", which cannot be assigned to declared type "None"
+     Type cannot be assigned to type "None" (pyright[reportGeneralTypeIssues])
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/datadog/profiling/ddup.py:2:24 - error: Import symbol "push_lock_name" has type "(lock_name: str) -> None", which cannot be assigned to declared type "None"
+     Type cannot be assigned to type "None" (pyright[reportGeneralTypeIssues])
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/datadog/profiling/ddup.py:2:24 - error: Import symbol "push_frame" has type "(name: str, filename: str, address: int, line: int) -> None", which cannot be assigned to declared type "None"
+     Type cannot be assigned to type "None" (pyright[reportGeneralTypeIssues])
+   /tmp/mypy_primer/projects/dd-trace-py/ddtrace/internal/datadog/profiling/ddup.py:2:24 - error: Import symbol "push_threadinfo" has type "(thread_id: int, thread_native_id: int, thread_name: str | None) -> None", which cannot be assigned to declared type "None"
+     Type cannot be assigned to type "None" (pyright[reportGeneralTypeIssues])

... (truncated 56 lines) ...```

@jackyzha0 jackyzha0 merged commit 5d35739 into main Aug 16, 2023
8 checks passed
@blast-hardcheese blast-hardcheese deleted the 2.0.4 branch March 10, 2024 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants