Add basedpyright language server support#1240
Conversation
Add basedpyright (a fork of pyright with additional features) as an alternative Python language server. It follows the same pattern as the existing pyright integration. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
Hi. We already support multiple python LS, including ty. What's the purpose of also supporting basedpyright? |
|
@MischaPanch It is better to use with agent the same LSP Server as in IDE — shared configs and so on |
|
Ok, that makes sense. Pls adjust the PR to run basedpyright with uvx like I have recently done for |
Why though? Which problem is being solved? Why does the configuration even matter, and what, effectively, is the difference when using basedpyright instead of pyright as the Python language server with Serena? |
fee8b1c to
d165272
Compare
|
@opcode81 it would help ensure agents are type checking the same way you are if you're using basedpyright. Also why basedpyright vs pyright - it has new diagnostic rules pyright doesn't and reimplements some pylance features. And why basedpyright vs other lsps - slower than others, but best conformance as of today (though other lsps are closing the gap: https://htmlpreview.github.io/?https://github.com/python/typing/blob/main/conformance/results/results.html). As one data point, Zed editor has made basedpyright their default lsp and disabled pyright out of the box. |
- New BasedPyrightServer using uvx-based launch (no bundled pip dependency) - PYTHON_BASEDPYRIGHT enum value (experimental) - Configurable: ls_path override, basedpyright_version override - Wired up in get_ls_class() and get_source_fn_matcher() - Key difference from PR oraios#1240: no basedpyright pip dependency, no uv.lock changes, no nodejs-wheel-binaries bloat (~60MB)
- New BasedPyrightServer using uvx-based launch (no bundled pip dependency) - PYTHON_BASEDPYRIGHT enum value (experimental) - Configurable: ls_path override, basedpyright_version override - Wired up in get_ls_class() and get_source_fn_matcher() - Key difference from PR oraios#1240: no basedpyright pip dependency, no uv.lock changes, no nodejs-wheel-binaries bloat (~60MB)
Summary
Changes
BasedPyrightServerclass insrc/solidlsp/language_servers/basedpyright_server.pyPYTHON_BASEDPYRIGHTenum value inLanguage(marked as experimental)basedpyright==1.38.4added as a bundled dependencyUsage
In
.serena/project.yml:Test plan
pytest test -m python— 53 passed)🤖 Generated with Claude Code