Alex Waygood

Results 892 comments of Alex Waygood

Yes, I just said that we shouldn't include instance methods in this check, only classmethods and maybe staticmethods. And above that, I also said that we should only emit the...

Note that the "with trivial body" part of this is important. For example, this is fine, because the abstract method has a default implementation: ```py from abc import abstractmethod class...

Mypy and pyrefly also emit a diagnostic on `G.method` in this snippet, where `F.method` is not explicitly abstract, but _is_ a protocol method with a trivial body. The same soundness...

Is this a duplicate of https://github.com/astral-sh/ty/issues/487?

> if you want to access these attributes first use `isinstance(..., FunctionType)`? or narrow the type using a `hasattr` check, yeah

> We could maybe special-case this to treat the return type from `FunctionType.__call__` as `object` instead of `Any`? In a stricter world that's what `FunctionType.__call__` should return. yes, I think...

If `T`, `U` and `S` are all fully static, `T & ~U` is only assignable to `S` if `T` is a subtype of `S` and `U` is disjoint from `S`....

Hmm interesting. I can dig in more tomorrow if Carl doesn't beat me to it while I'm asleep :-)

> > If `T`, `U` and `S` are all fully static, `T & ~U` is only assignable to `S` if `T` is a subtype of `S` and `U` is disjoint...

> I'm not sure if it's even worth erroring if the VIRTUAL_ENV path is incorrect. Just logging a warning is probably fine I think I'd much prefer a hard exit...