Eric Traut

Results 51 issues of Eric Traut

In verbose mode, pyright should output the pythonVersion it is assuming. It currently logs: `Assuming Python version [object Object]`

bug
addressed in next version

I noticed this behavior when investigating a [similar issue in pyright](https://github.com/microsoft/pyright/issues/8554). Mypy isn't correctly narrowing tuples in some cases. ```python from typing_extensions import TypeIs def is_tuple_of_strings(v: tuple[int | str, ...])...

bug

When overload matching is ambiguous due to an `Any` argument, mypy typically looks at the return types of the potential matches. If the return types differ, it evaluates the return...

bug
topic-type-narrowing
topic-typeguard

* Attempts to clearly define the algorithm for overload matching. * Describes checks for overload consistency, overlapping overloads, and implementation consistency.

The typing spec indicates that only instantiable class objects are compatible with `type[T]`. Pyright correct detects an attempt to assign an abstract class to `type[T]` in most cases, but it...

bug

### Discussed in https://github.com/microsoft/pyright/discussions/9004 Originally posted by **Delgan** September 16, 2024 Hi. I've read the docs about [Library interface](https://github.com/microsoft/pyright/blob/main/docs/typed-libraries.md#library-interface) but I can't understand why isn't `pyright` reporting an error when...

enhancement request

I noticed this issue when exploring a [feature request](https://github.com/microsoft/pyright/issues/8434) in pyright. The following code results in an "INTERNAL ERROR" when running mypy. ```python from typing import Final MY_CONST: Final =...

crash

When using PEP 728, it's possible to specify `extra_items=Never`. The PEP indicates that this should be functionally equivalent to `closed=True`. Pyright fails to generate an error in this case: ```python...

bug
addressed in next version

The narrowed type in the following example is incorrect: ```python class A(TypedDict): a: int def func(t: A): if "b" in t: reveal_type(t) # Should be `A`, not `Never` ``` We...

bug
addressed in next version

This [discussion](https://github.com/microsoft/pyright/discussions/10365) uncovered an apparent bug. If the class `mpz` is renamed `i` (or any name beginning with a character prior to `i`), the overlapping overload error disappears. I suspect...

bug