Skip to content

refactor: ♻️ revise post to decide on Pyrefly, not mypy#313

Open
lwjohnst86 wants to merge 2 commits into
mainfrom
refactor/post-on-using-pyrefly
Open

refactor: ♻️ revise post to decide on Pyrefly, not mypy#313
lwjohnst86 wants to merge 2 commits into
mainfrom
refactor/post-on-using-pyrefly

Conversation

@lwjohnst86

Copy link
Copy Markdown
Member

Description

Pyrefly had its first stable release, so this is a good time to switch now.

Needs a quick review.

Checklist

  • Ran just run-all

@lwjohnst86 lwjohnst86 requested a review from a team as a code owner July 6, 2026 14:15

@signekb signekb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. Looking forward to trying it out.

Comment thread why-mypy/index.qmd
Facebook. Additionally, we continue to use VS Code's Pylance language server,
which runs Pyright internally, complementing the feedback we get from `mypy`.
We decided on Pyrefly as it recently made an official stable release, and
compared to `mypy` is just so much faster. It has all the necessary features we

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
compared to `mypy` is just so much faster. It has all the necessary features we
compared to `mypy`, it is just so much faster. It has all the necessary features we

Comment thread why-mypy/index.qmd
Static type checking helps to catch bugs earlier and contributes to the long-term maintainability and overall quality of Python codebases.
This post explains why we chose `mypy` as our static type checker over other alternatives.
Static type checking helps to catch bugs earlier and contributes to the
long-term maintainability and overall quality of Python codebases. This post

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
long-term maintainability and overall quality of Python codebases. This post
long-term maintainability and overall quality of Python codebases. This post

@github-project-automation github-project-automation Bot moved this from In review to In progress in Platform development Jul 7, 2026

@joelostblom joelostblom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll approve in terms of the edits to the post, but I have a higher level question about the decision to switch type checker at this point: Are we expecting to switch ty at some point later when there is a stable release? I'm thinking that would be closely integrated to that we already use uv and ruff from astral and I don't see any strong reason here against it other than the lack of a stable release.

If we are planning to switch (or even consider switching to ty) in the not too distant future, it could save us time to hold off with implementing this decision so that we don't spend time on swtiching twice: first re-structuring our pipelines and code to work well with how pyrefly does type checking and then again when switching to ty. It seems like there could end up being a lot of time spent on changing tooling between different options otherwise.

If we plan to stick to pyrefly and not consider ty, then I see no issue.

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

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

3 participants