Alex Waygood

Results 861 comments of Alex Waygood

> Are there other tools except for stubtest that benefit from exposing the "correct"/intended function signature? It will also affect the signature displayed by `help()` in the builtin Python REPL,...

Actually, I can't reproduce: https://mypy-play.net/?mypy=latest&python=3.10&gist=aa1db479d5f97e6cd67fede0b7c543e1

Mypy 0.910 is pretty old, but this reproduces on mypy 0.971 as well: https://mypy-play.net/?mypy=0.971&python=3.10&gist=06680dd02ef89d10ada867a731a1f618

> Hm, weird, can you try `466977`? That works, but you need to let us out of the waiting room ;)

This is possibly a repro without pattern-matching: ```python from typing import Generic, TypeVar T = TypeVar("T") class Foo(Generic[T]): attr: T def __init__(self, attr: T) -> None: self.attr = attr class...

> It looks like #3603 was fixed, shouldn't it just work now? Maybe it *should*, but it doesn't :) there's still loads of code erroneously marked as unreachable if you...

@Michael0x2a, thanks for the context! I've marked this PR as draft for now — personally, I think option (1) would be the ideal solution. The fundamental problem seems pretty similar...

This causes at least one deprecation warning to be emitted in the stdlib: ```shell C:\Users\alexw\coding\cpython>python -m idlelib Running Debug|x64 interpreter... C:\Users\alexw\coding\cpython\Lib\platform.py:850: PendingDeprecationWarning: Locking cached_property is deprecated; use @cached_property(lock=False) @functools.cached_property C:\Users\alexw\coding\cpython\Lib\platform.py:850:...

> That said, this PR's approach to deprecation is going to be rough on users and will leave a permanent mark on the API [...] ISTM the most graceful thing...

> > Tests / Windows (x86) (pull_request) Failing after 31m > > https://github.com/python/cpython/actions/runs/3091293898/jobs/5001192381 > > This does not seem related to the changes on the PR. Also the latest commit...