David Peter

Results 1367 comments of David Peter

For older pyspark versions, and for the MRE in your script.py, please see the discussion in https://github.com/astral-sh/ty/issues/491. This is a weak point in Python's type system (not specific to ty,...

Thank you for reporting this. Have you seen [this FAQ entry](https://docs.astral.sh/ty/reference/typing-faq/#why-cant-ty-resolve-my-imports)? (let us know if that is not enough to resolve your issue).

Can you tell us how you run ty, and maybe run it with `-v`, to see the search paths?

`ty_extensions` should probably be ranked lower than stdlib. This is especially annoying for `reveal_type`, which I probably use much more than our users, but it's still annoying that `reveal_protocol_interface` is...

I was typing out an example snippet in the playground today, and was very surprised that I got this diagnostic: ``` Variable of type `TypeVar` is not allowed in a...

The whole `_typeshed._type_checker_internals` module could probably be hidden from completions:

I found this surprising. This seems to suggest that it would complete `TypedDict` for me and add the necessary `from typing import …, TypedDict` import: What happens instead is that...

Local variables should probably always be prioritized. Consider a case like the following, which happened for Alex yesterday, and completely independently for me just now. If you just try to...

> So in theory, the heuristic could be adapted to prefer the unqualified import if there's already both. I'm not sure how well that heuristic would work. That seems reasonable...

> where we'd just arbitrarily favour the `typing` module over other stdlib modules I can't find the reference anymore, but I argued elsewhere that this should be based on real-world...