basedpyright
basedpyright copied to clipboard
pyright fork with various type checking improvements, improved vscode support and pylance features built into the language server
### Description https://github.com/microsoft/pyright/issues/9226
### Description from https://github.com/microsoft/pyright/issues/8007: > ### Describe the bug > > **TL;DR:** false-positive `Override does not handle all overloads of base method` > > Pyright reports an incompatible method override...
### Description Folders listed under `strict` in the configuration appear to use the "recommended" type checking mode instead of "strict", resulting in different OOTB results when compared to Pyright. This...
### Description Code sample in [basedpyright playground](https://basedpyright.com/?typeCheckingMode=all&code=GYJw9gtgBALgngBwJYDsDmUkQWEMoAK4MYAxmADYCwAULbaRQIYDOLUAYmGABRFglyFAJQAuWlElQAJgFNgUVtOA8WsisGFQAtAD4oLGCFFQAxFFkhwICVLsAiR0uCP7QA) ```python from typing import Protocol class Foo(Protocol): def asdf(self) -> str: # error """asdf""" ``` upstream issue: https://github.com/microsoft/pyright/issues/9037
### Description Code sample in [basedpyright playground](https://basedpyright.com/?typeCheckingMode=all&reportUnusedParameter=false&code=GYJw9gtgBApgdgV2gSwgBzCALlAooiAWAChRIosBPNZOAcylQ2ygBlksYQBDAGxIHEAxr24BnMVABiYMAAp8SAJQAuElA1RuUALxQAjOs0AjXVABMgkgBMYwKMFkBtACoBdOQDc%2BCGCqguSlAAtAB8Af4AdNFWxCAwnjB8APpUaDByjvIA5OLWwNlKQQDEUGJYIAA0ZQAWYAi81lDGMFAARHnAbSTxiSlpGVlyMmCR3EVQpSPVYnUNTS1sHFx8TiNjbkA) ```python from enum import Enum from typing import Literal class Foo(Enum): a = 1 b = 2 def foo[T](value: T) -> T: ......
### Description Code sample in [basedpyright playground](https://basedpyright.com/?typeCheckingMode=all&code=GYJw9gtgBApgdgV2gSwgBzCALlAooiAWAChRIosBPNZOAcylQ2ygBlksYQBDAGxIHEAxr24BnMVABiYMAAp8SAJQAuElA1RuUALxQAjOs0AjXVABMgklTQxpsgEJgEcACZn2nHrwDaMsAB03AA09oHGALqCrjDAUAD6cgBufAgwKmGqRhrxGf5OLu56KbxpJEA) ```python from enum import Enum from typing import Literal class Foo(Enum): a = 1 b = 2 type FooBound = Literal[Foo.a, Foo.b] def...
### Description Hello! First of all, thanks for all your efforts. This is a great project! I am trying to migrate our single-src folder layout to uv workspaces. Unfortunately, basedpyright...
### Description  but completions work:   this seems to only happen when the only available suggestion is a module import (`import x`) rather than a `from x import...
i think they should always run outside the venv, because there are tests specifically to be run inside a venv which implies the rest of the tests should be runnable...
### Description This would be nice to have, as it allows for the "Expand/Shrink Selection" features in VSCode, which Pylance currently supports. LSP: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_selectionRange