Skip to content

Add basedpyright language server support#1240

Open
arikon wants to merge 1 commit intooraios:mainfrom
arikon:add-basedpyright-support
Open

Add basedpyright language server support#1240
arikon wants to merge 1 commit intooraios:mainfrom
arikon:add-basedpyright-support

Conversation

@arikon
Copy link
Copy Markdown
Contributor

@arikon arikon commented Mar 29, 2026

Summary

  • Add basedpyright as an alternative Python language server (experimental)
  • basedpyright is a fork of pyright with additional features and stricter type checking
  • Follows the same integration pattern as the existing pyright server

Changes

  • New BasedPyrightServer class in src/solidlsp/language_servers/basedpyright_server.py
  • PYTHON_BASEDPYRIGHT enum value in Language (marked as experimental)
  • basedpyright==1.38.4 added as a bundled dependency
  • Test repo alias and pytest marker added

Usage

In .serena/project.yml:

languages:
- python_basedpyright

Test plan

  • Existing Python tests pass (pytest test -m python — 53 passed)
  • ruff lint and format pass
  • mypy type check passes (no new errors)

🤖 Generated with Claude Code

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) <noreply@anthropic.com>
@MischaPanch
Copy link
Copy Markdown
Contributor

Hi. We already support multiple python LS, including ty. What's the purpose of also supporting basedpyright?

@arikon
Copy link
Copy Markdown
Contributor Author

arikon commented Mar 31, 2026

@MischaPanch It is better to use with agent the same LSP Server as in IDE — shared configs and so on

@MischaPanch
Copy link
Copy Markdown
Contributor

Ok, that makes sense. Pls adjust the PR to run basedpyright with uvx like I have recently done for ty, so it can be installed on the fly. Serena's users are essentially all uv users, and this way we can prevent having basedpyright as dependency. It's a fairly large package and offers no benefit to most users

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants