Brian Schubert
Brian Schubert
Looks like this can be closed as superseded by #124 🎉
Same issue here. Right-clicking on the Docker Desktop icon in the system tray and clicking "Quit Docker Desktop" results in all open gnome-terminal windows being closed at the same time...
It turns out this affects any union of a generic type (not just Callable). For example: ```python def is_int_list(c: list[str] | list[int]) -> TypeIs[list[int]]: ... def foo(x: list[str] | list[int])...
This boils down to ```python def foo[T](*x: T) -> T: ... reveal_type(foo(1, "a")) # N: Revealed type is "builtins.object" ```
Yeah, specifics matter for the inference rules. Closer to this case would be ```python def foo[T: BaseException](*x: T) -> T: ... reveal_type(foo(ValueError(), TypeError())) # N: Revealed type is "builtins.Exception" ```...
For reference, the "consider renaming" error was introduced by #113769
The documentation has seen some lengthy improvements since this issue was opened. I see that the current documentation includes examples of using Callable with type variables. Is anything else required...
Bisects to b50f3a1a44038b5f6304f77263f6e08c157f9aa8 (#18538), cc @ilevkivskyi Without `--no-strict-optional`, `i` is narrowed to `Never`: ```shell $ mypy --version mypy 1.16.0+dev.b50f3a1a44038b5f6304f77263f6e08c157f9aa8 (compiled: no) $ mypy --no-strict-optional fileapi.py fileapi.py:5: note: Revealed type is...
Yeah, this was an intentional change. The ignore is unused in the sense it isn't necessary under the current configuration and removing it would not result in a diagnostic being...
The main issue with the previous behavior was that it was inconsistent and also not very predictable. It only worked for some errors (not necessarily even for all errors with...