Eric Traut

Results 355 comments of Eric Traut

Ah, that was what I was missing. I though this error code was enabled by default in recent versions of mypy.

Interesting, mypy seems to be able to analyze this code much faster on Python 3.10 than on 3.11. Using mypy 0.982 in both cases, I see the following times on...

@JelleZijlstra, did mypy 1.9 fix the issue in stubtest that was blocking us from making the necessary changes in typeshed for enums? If not, is that something that could be...

`ClassVar` is a type qualifier that can be used only in specific contexts [as specified in the Python typing spec](https://typing.readthedocs.io/en/latest/spec/class-compat.html#classvar). You're using it outside of an allowed context. In short,...

I'm not sure how else to phrase the error. The typing spec is clear that `ClassVar` can be used only in certain contexts. You're using it in a context that...

If SqlAlchemy is using this in a way that is disallowed by the current spec, they should either fix their usage or work with the typing community to come to...

It's not clear to me why you're using an overload here. It seems unnecessary — and the cause of the problem you're seeing. Have you tried simply deleting the overload...

> it seems to be a pretty common mistake Do we have evidence of this statement, or is this just conjecture? I suspect this mistake is more common for someone...

@tiangolo, it looks like you're planning to move forward with your proposal to use `Annotated` for parameter documentation. Consistent with the feedback I gave you in email, I think this...

Thanks for the additional context. > VS Code Python could at least make sure it doesn't show the Annotated part in tooltips, as that's intentionally made to carry metainformation not...