Skip to content

DO NOT MERGE: Sync changes from upstream main branch - #137

Draft
varungandhi-src wants to merge 528 commits into
scipfrom
vg/sync-upstream
Draft

varungandhi-src wants to merge 528 commits into
scipfrom
vg/sync-upstream

Conversation

@varungandhi-src

Copy link
Copy Markdown
Contributor

No description provided.

erictraut and others added 30 commits June 12, 2023 08:40
…pe variables whose values are provided by other argument types in a call. This addresses microsoft/pyright#5243. (#5273)

Co-authored-by: Eric Traut <erictr@microsoft.com>
* Improved the protocol matching logic so it honors partially-solved type variables whose values are provided by other argument types in a call. This addresses microsoft/pyright#5243.

* Updated typeshed to the latest version.

---------

Co-authored-by: Eric Traut <erictr@microsoft.com>
…en analyzing an overloaded function that includes a ParamSpec that uses itself as an argument. This addresses microsoft/pyright#5163. (#5276)

Co-authored-by: Eric Traut <erictr@microsoft.com>
…rride` error for overloaded method overrides in cases where the overloads are differentiated based on explicit types for the `self` or `cls` parameter. This addresses microsoft/pyright#5275. (#5279)

Co-authored-by: Eric Traut <erictr@microsoft.com>
…tion that returns a callable with a ParamSpec that does not appear outside of the return type annotation. This addresses microsoft/pyright#5283. (#5284)

Co-authored-by: Eric Traut <erictr@microsoft.com>
…ument` diagnostic when using a generic type in conjunction with the `|` union operator in the second argument to an `isinstance` or `issubclass` call. This addresses microsoft/pyright#5294. (#5295)

Co-authored-by: Eric Traut <erictr@microsoft.com>
…e case where a partially-solved type variable with a solution of `Any` are provided by other argument types in a call. This addresses microsoft/pyright#5243. (#5296)

Co-authored-by: Eric Traut <erictr@microsoft.com>
…atibleMethodOverride` check when a child class is overriding an overloaded method in the base class and one or more of the overloads doesn't apply because the `self` or `cls` parameter is explicitly annotated in a way that's not applicable to the child class. This addresses microsoft/pyright#5288. (#5302)

Co-authored-by: Eric Traut <erictr@microsoft.com>
…` call. There were situations where the incorrect MRO class was used. This addresses microsoft/pyright#5299. (#5304)

Co-authored-by: Eric Traut <erictr@microsoft.com>
Co-authored-by: Eric Traut <erictr@microsoft.com>
* Update command-line.md

clarify that `--version` prints the version *and exits*

* Update --version usage string

Clarifies that `--version` prints the version *and exits*, this is fairly common language used by most CLI apps to indicate what the behavior of `--version` is. It may surprise new users that `--version` exits rather than appending the version with the previous language.
…or dictionaries to a constructor for a class that doesn't provide its own constructor and falls back to the `object` constructor.
… an unannotated parameter with a default value consisting of a lambda. This addresses microsoft/pyright#5306.
…tion that returns a callable with a ParamSpec that does not appear outside of the return type annotation. A previous fix didn't correctly handle the case that involved a class parameterized with a ParamSpec. This addresses microsoft/pyright#5283.
…validated against the `**kwargs` parameter type. This addresses microsoft/pyright#5309. (#5310)

Co-authored-by: Eric Traut <erictr@microsoft.com>
…ase where Any or Unknown arguments are present. (#5316)

Co-authored-by: Eric Traut <erictr@microsoft.com>
…thin an "expected type" should be used for bidirectional type inference. This addresses microsoft/pyright#5312. (#5317)

Co-authored-by: Eric Traut <erictr@microsoft.com>
…pressions where an inner call expression used a ParamSpec. This addresses microsoft/pyright#5281. (#5322)

Co-authored-by: Eric Traut <erictr@microsoft.com>
…he same TypeVar in an invariant context. This addresses microsoft/pyright#5321. (#5323)

Co-authored-by: Eric Traut <erictr@microsoft.com>
…thods for purposes of calculating the variance of a TypeVar. This mirrors the behavior of mypy. (#5327)

Co-authored-by: Eric Traut <erictr@microsoft.com>
…ric class (with a constructor that includes class-scoped TypeVars) as an argument for a callable parameter. The class was being specialized prematurely (with type arguments set to `Unknown`) before the constraint solver was able to solve the higher-order function's type variables. This addresses microsoft/pyright#5324. (#5328)

Co-authored-by: Eric Traut <erictr@microsoft.com>
erictraut and others added 29 commits August 14, 2023 21:45
…atement. This addresses microsoft/pyright#5716. (#5724)

Co-authored-by: Eric Traut <erictr@microsoft.com>
… dataclass. This addresses microsoft/pyright#5707. (#5725)

Co-authored-by: Eric Traut <erictr@microsoft.com>
…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 <erictr@microsoft.com>
…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 <erictr@microsoft.com>
…g as the index is positive and falls within a determinate portion. This addresses #5726. (#5729)

Co-authored-by: Eric Traut <erictr@microsoft.com>
…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.
…ances when a callable using `Concatenate` is assigned to another callable using `Concatenate`.
…mport targets a module that doesn't contain a `__all__` definition but includes dundered names in its module namespace. This addresses #5737.
…rtain cases where the signature bound to the ParamSpec was generic. This is related to this bug in the mypy issue tracker: python/mypy#15753.
…his addresses #5699. (#5739)

Co-authored-by: Eric Traut <erictr@microsoft.com>
…stom value type can be specified in the Enum subclass. This addresses #5741.
…thodOverride` check in certain circumstances where the method in both the base class and child class are overloaded. This addresses #5718. (#5746)

Co-authored-by: Eric Traut <erictr@microsoft.com>
…ction with no return type annotation was called recursively. This addresses #5745.
…thodOverride` check when overriding a method with a ParamSpec. This addresses #5750.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

9 participants