DetachHead
DetachHead
another issue caused by the same thing: ```py # mypy: enable-error-code=redundant-expr from types import MethodType, FunctionType from typing import Callable a: Callable[[], None] if isinstance(a, FunctionType) or bool(): ... #...
@bvedang upstream mypy does not complain when overridden methods have incoorect argument names: ```py from typing import override class Foo: def foo(self, a: object): ... class Bar(Foo): @override def foo(self,...
if assigning an `Any` to a variable that takes a `str` causes the variable to remain typed as a `str`, why does assigning an `Any | str` to a variable...
another example: ```py from collections.abc import Iterator, cast a = Iterator[int] ```
there does seem to be a difference between pylance and pyright here. for me in vscode, pylance shows docs for the builtins while pyright doesn't, with the same value set...
> Here is a python script stripped from Pylance thanks for the info, though i'm a bit paranoid about stuff like this. since pylance is closed source i don't think...
i think the ideal solution would be to just add docstrings to `builtins.pyi` in typeshed. i've raised https://github.com/python/typeshed/issues/12085 if that gets rejected, we can consider a different approach
it turns out that pylance module scraper is MIT licensed, so i think that means we're allowed to use it
> Just a FYI. On my side, somehow `pyright` seems to always prefer using its bundled typeshed's stdlib stubs. So eventually I use `.py` extension for generated stdlib stubs so...