Loïc Simon
Loïc Simon
I encountered a similar issue with mapping unpacking, I suppose it fits here: ```py values: list[str] | dict[str, str] = ... match values: case {"key": value}: reveal_type(value) ``` produces ```...
I tried to dig into this. If I got it right, there are several similar-but-distinct issues here: 1. [exoriente](https://github.com/python/mypy/issues/12364#issue-1170890926) & [wrzian](https://github.com/python/mypy/issues/12364#issuecomment-1836927742) cases: mypy doesn't narrow individual items inside a sequence...
Just got bitten by this again, @JelleZijlstra do you think you could take a look at [the linked PR](https://github.com/python/mypy/pull/16905), or ping anyone who could? Can I do something to help?...
Yeah, this is falls in the case 2: > 2. [alexpovel](https://github.com/python/mypy/issues/12364#issuecomment-1179683164) case: mypy doesn't narrow individual items after a non-match with sequence pattern(s). This looks more complex to achieve since...
Could also be used to indicate that the commit was created automatically (by a CI job, for example!)
I encountered a similar issue, there seem to be a bug with `TypeIs[type[...]]`: considering the guard ```py def is_str_type(typ: Any) -> TypeIs[type[str]]: return typ is str ``` the following works...
> Could you extract those into a separate PR? I think those are nice to have in any case and we can merge it quickly :) Sure, https://github.com/python/cpython/pull/143244
We could, yes. I don't think we can decide to auto-import solely on module name (to take care of potential shadowing by first/third-party modules), so we would need to look...
The new test is quite platform-dependant (I just fixed an iOS + Andoid only fail), it may be a good idea to trigger buildbots on this PR!
> I can run the buildbots, do you want them now? Yes please! I don't plan any more change on my side.