Alex Waygood
Alex Waygood
Symbols already in scope should probably take priority over those that would require an import:
I just had auto-import complete `class Foo(Pro` with `asyncio.protocols.Protocol` for me: ```py from asyncio.protocols import Protocol class Foo(Protocol) ``` that not what I wanted or expected... I was hoping to...
> I can't find the reference anymore, but I argued elsewhere that this should be based on real-world usage. That does sound like a good idea. But a better corpus...
> There exists scripts out there to download and analyze the top 5,000 PyPI packages, but I can't remember who wrote them... but I could ask around here's how to...
`typing.Set` is deprecated, so it makes sense to me to suggest `ast.Set` over `typing.Set` (you can just use `set` on all non-end-of-life Python versions at this point). `typing.TypeVar` is deprecated...
Yeah, I've made a few edits to the typing.py docs in the past to really emphasise the "‼️‼️ Deprecated ‼️‼️" nature of the legacy aliases like `typing.Set`. There's no reason...
> Also, I miss popular imports like `import numpy as np`, `import pandas as pd`. Having an option to add custom ones would be even better, though I'm not sure...
Thanks! Definitely a bug. We need to suppress this error when we can see we're in unreachable code blocks
Ah, good point @sinon. Hmm, yes, it looks like we've correctly deduced that the first branch is always reachable, because you've used an `or` rather than an `and`, @flying-sheep, and...
> Since the `set` constructor is generic (`def __init__(self, iterable: Iterable[_T], /) -> None: ...`), I think this is just an instance of [#1714](https://github.com/astral-sh/ty/issues/1714). but our existing generics solver _should_...