Eric Traut

Results 263 comments of Eric Traut

> The first line of code in a stub file may be an assert statement That won't work for pyright and pylance. We need to determine which type stubs are...

@Avasam, no, pyright has no special-case knowledge of `distutils` or its stub file. However, the `VERSIONS` file in typeshed says that the stub is unsupported on Python 3.12: `distutils: 3.0-3.11`....

@AlexWaygood, that's right. On python 3.11 and earlier, pyright is resolving the import to the stdlib stub. On python 3.12 and newer, the VERSIONS file indicates that it should no...

> override PEP explicitly specifies that type checkers should offer strict enforcement That's different. The `override` decorator doesn't affect type consistency rules. I don't think type consistency rules should change...

I think `cache` and `lru_cache` can be used with either methods or non-method functions, right? Wouldn't that approach break for non-methods?

I was hoping that someone who is more familiar with how these calls are meant to work could suggest a solution.

I don't think that works. This doesn't work with non-method functions that take no parameters. ```python @cache def func() -> int: return 0 ``` Maybe this isn't the right approach?...

Please create a minimal, self-contained code sample that demonstrates the issue as requested in the issue template. The code sample you provided above references a bunch of symbols whose origins...

If my understanding is correct, today's semantic token provider generates tokens based on semantic categories only, not on type information. What you're proposing would require the token provider to perform...

I don't think there's a "correct" answer here. I can point to cases where either choice is correct. The current behavior is at least internally consistent. If a callable object...