Skip to content

Conversation

@yangdanny97
Copy link

@yangdanny97 yangdanny97 commented Dec 19, 2025

📝 Summary

Similar to recent PRs for ty & basedpyright, this PR adds support for Pyrefly, another fast language server and type checker

I read through the discussion in #1163, and I think that Pyrefly would be a good addition (perhaps falling somewhere between basedpyright & ty on the spectrum of maturity).

It's being used in similar tools like Positron, and is significantly more complete in terms of type system coverage than ty

Diagnostics

Screenshot 2025-12-19 at 9 59 15 AM Screenshot 2025-12-19 at 9 27 36 AM

🔍 Description of Changes

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • I have added tests for the changes made.
  • I have run the code and verified that it works as expected.

@vercel
Copy link

vercel bot commented Dec 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
marimo-docs Ready Ready Preview, Comment Dec 21, 2025 6:35pm

@github-actions github-actions bot added the bash-focus Area to focus on during release bug bash label Dec 19, 2025
@github-actions
Copy link

github-actions bot commented Dec 19, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@akshayka
Copy link
Contributor

Thanks @yangdanny97! We're happy to review this. If this gets merged, we can document its support in our own docs, but also on Pyrefly docs (here: https://pyrefly.org/en/docs/IDE-features/#notebook-support) — does that sound good to you?

@yangdanny97
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@yangdanny97
Copy link
Author

@akshayka hi, thanks! Yep, I'll update Pyrefly's docs once this is merged.

I'm still working on debugging the diagnostics. Pyrefly is sending them (I can see it in the lsp logs) but somehow the listener does not pick them up, even if diagnostics box is checked in the user config. All other LSP functionalities work.

@yangdanny97
Copy link
Author

yangdanny97 commented Dec 21, 2025

I wonder if there's an issue with my local setup. I can't get diagnostics to appear for basedpyright or ty in my local dev build either, even without the changes in this PR.

@winstxnhdw do you remember having to do any sort of special dev setup to test your PRs for bpr/ty, or were the steps in https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md#setup sufficient?

@winstxnhdw
Copy link
Contributor

winstxnhdw commented Dec 23, 2025

Hey @yangdanny97

I didn't have to do anything special. I did have to restart my setup every time I switch LSPs though. It might be worth looking at the console logs to see if an exception is being thrown.

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

Labels

bash-focus Area to focus on during release bug bash

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants