Shantanu

Results 383 comments of Shantanu

An approach like https://github.com/python/mypy/issues/3186#issuecomment-762121456 could be feasible.

Can confirm that there aren't yet many open source projects that run pyright in CI (I previously spent some time trying to finding these since it seemed like a promising...

(retitled the issue to be more specific, feel free to change if I misunderstood what's going on here)

I'd be in favour of adding `__init__` stubs to each subclass. PR welcome!

I would prefer explicit `__init__`s, since typically typeshed prefers to mirror closely what's happening at the runtime, rather than getting fancy and lying. Also not sure how well supported PEP...

Yeah, I too learnt about this somewhat recently. mypy does not handle this use of `__all__` without a corresponding import to define the symbol, although stubtest has some special handling...

Seems like I'm in the minority, but I'm -1 on this. Breaking almost every use case of contextmanager for something pretty niche is too much for me. Other than your...

Also note that a linter could warn for contextmanager decorated functions that don't yield. Could be a good check to add to pylint or flake8-bugbear. Since this wouldn't look at...

@asottile could you share more thoughts on why your case couldn't be caught by a simple and much less disruptive new linter check? It's unclear to at least Alex and...

I would prefer not merging this. This specific find-replace also makes me uneasy; there are definitely places where `Callable[..., object] -> Callable[..., Any]` can result in false negatives. Moreover, while...