Alex Waygood

Results 892 comments of Alex Waygood

> The current protocol has been included in at least two beta releases by now It should be fairly easy to change the return type at any point before the...

> We can't update pyright due to a bug: [microsoft/pyright#10487](https://github.com/microsoft/pyright/issues/10487) [microsoft/pyright#10484](https://github.com/microsoft/pyright/issues/10484) These are now resolved, but we have a new false positive on Python 3.14 that makes little sense to...

See https://github.com/python/typeshed/pull/8787 and #8789 for previous discussion

Yeah I'm definitely open to revisiting either #8787 or #8789! The current stubs are incorrect, for sure.

> You can achieve an analogous result on Python 3.7 with new-style type annotations, but I believe you require `__future__.annotations`, which is unfortunately only available in Python 3.7. See [peps.python.org/pep-0563](https://peps.python.org/pep-0563/)....

> Great to know! CI seems to fail because there are some places in which the annotations are not in quotes in this PR. Ah, cool, that's a bug in...

> 1. Adding this feature to `stubtest`. It can check that `__slots__` contents do match. Probably behind a feature flag. We can enable it for `stdlib` only It's currently included...

As @Akuli says, I don't think adding `__slots__` to the stub helps much with whether or not type checkers will validate attribute assignments. Where it _might_ help is in code...

We don't support automatically resolving imports from a non-virtual (global/system) environment. If you point us to a non-virtual environment using `--python`, we will resolve imports from that environment, but we'd...

Thanks! This issue is similar to https://github.com/astral-sh/ty/issues/860. We get our type here from typeshed's `types.ModuleType` stub: https://github.com/python/typeshed/blob/8d96801533918957fb194e101cb321bfe1f836f8/stdlib/types.pyi#L362-L368. The reason why typeshed has the type `str | None` for this attribute...