Skip to content

Add Pyrefly support#7567

Merged
mscolnick merged 11 commits intomarimo-team:mainfrom
yangdanny97:main
Feb 12, 2026
Merged

Add Pyrefly support#7567
mscolnick merged 11 commits intomarimo-team:mainfrom
yangdanny97:main

Conversation

@yangdanny97
Copy link
Contributor

@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 Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Feb 12, 2026 4:13pm

Request Review

@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
Contributor Author

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

@yangdanny97
Copy link
Contributor 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
Contributor 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.

@yangdanny97 yangdanny97 marked this pull request as ready for review February 12, 2026 15:52
@yangdanny97 yangdanny97 changed the title WIP: Add Pyrefly support Add Pyrefly support Feb 12, 2026
mscolnick
mscolnick previously approved these changes Feb 12, 2026
@mscolnick mscolnick added the enhancement New feature or request label Feb 12, 2026
@MarcoGorelli MarcoGorelli mentioned this pull request Feb 12, 2026
5 tasks
@MarcoGorelli
Copy link
Contributor

Demo of some LSP features from building this locally

Diagnostics:

image

go-to-definition

gotodef

image

My config:

image

@mscolnick
Copy link
Contributor

@yangdanny97, i think the OpenAPI spec is failing. you may need to run make fe-codegen

@mscolnick
Copy link
Contributor

i think there is a failing unrelated test. this looks great, thanks @MarcoGorelli and @yangdanny97 !

@mscolnick mscolnick merged commit 8820949 into marimo-team:main Feb 12, 2026
35 of 61 checks passed
@github-actions
Copy link

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.19.11-dev3

@yangdanny97
Copy link
Contributor Author

Thanks for the quick review!

meta-codesync bot pushed a commit to facebook/pyrefly that referenced this pull request Feb 27, 2026
Summary:
The "notebook support" section doesn't mention Marimo support, which was added in marimo-team/marimo#7567 . I discussed with mscolnick about adding it to the Pyrefly docs

Pull Request resolved: #2545

Reviewed By: grievejia

Differential Revision: D94521297

Pulled By: yangdanny97

fbshipit-source-id: 7565b60e15b6a722fd49b33b001850eed9f7eb61
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 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants