DetachHead

Results 933 comments of DetachHead

the issue is actually that it only narrows literals: ```py def f(a: int | None, b: int): if a == 1: reveal_type(a) # Literal[1] if a == b: reveal_type(a) #...

actually this would be unsafe because a subtype of `int` could define a custom `__eq__`. so this should only work if the class is `@final`

narrowing with `is` instead of `==` should also work because it doesn't use `__eq__`

sure. though i don't really use snippets so perhaps someone more familiar with them could work on this

the fact that there are abstract methods with implementations that don't raise exceptions when called and instead return a completely invalid value is absurd ```py class Sized(metaclass=ABCMeta): __slots__ = ()...

looks like you just have to restart the language server after running `uv sync --all-packages`. i was able to reproduce this on both pyright and basedpyright and restarting the language...

come to think of it i don't see why you should have to restart the language server at all. the file watcher seems to detect when new dependencies are added...

> (I was a little confused that restart language server in vscode is not under python: when using basepyright.) i rebranded everything mainly to prevent conflicts for users who want...

it's hard to reproduce without a complete example. what does the whole project structure look like? ie. what is `foo`, `bar` and `xyz` and where are they located?

yeah, but the tagged hints are still being reported. see the strikethrough on `List` in the screenshot