Alex Waygood

Results 902 comments of Alex Waygood

> It took me literally two hours of debugging. I was able to reproduce this problem only in my newly written test. That's it. Nothing else worked. > > Somehow...

> What `pyright` does in this case? @erictraut I would appreciate your help. @erictraut any thoughts on this? It looks like pyright handles this kind of thing much better than...

Interesting idea. How would users opt into the "stricter" stubs? Do you propose that type checkers add a new config setting? I'm not a fan of reusing the `TYPE_CHECKING` constant,...

I agree with @srittau. I think `AnyOf` would have _great_ utility for typeshed and be very frequently used. The disadvantage of `STRICTER_STUBS`, as it was put forward in @not-my-profile's original...

I agree that the name of `AnyOf` isn't ideal, but I do think we need a new special form for this, for the reasons @srittau sets out. Special-casing `X |...

I'd like to plug my enum PR here: - #12963 It fixes a false-positive error that was introduced a few releases back, and it's a very simple fix. It would...

> I have cut the release branch https://github.com/python/mypy/commits/release-0.970 at [9f99400](https://github.com/python/mypy/commit/9f99400b748a4550813c54fb3f7a00268affdd6d) (this includes the above fixes). Awesome, thank you!

(I can confirm that typeshed has now dropped support for 3.6 as of this morning: https://github.com/python/typeshed/pull/8269.)

Would it be possible to have https://github.com/python/typeshed/pull/8295 cherry-picked? It would be annoying to have to wait until the next mypy release, and it's pretty low-risk.

The issue seems to be that the call to `is_subtype_helper` here returns `False`, whereas for a class without a metaclass, it returns `True`: https://github.com/python/mypy/blob/d27bff62f71a8b914b1df239467148e81d2e88a2/mypy/stubtest.py#L887