github facebook/pyrefly 0.20.0
v0.20.0

latest releases: 0.32.0, 0.31.1, 0.31.0...
2 months ago

Pyrefly 0.20.0

Status : ALPHA
Release date: 16 June 2025

Pyrefly 0.20.0 represents 165 commits from 21 contributors and focuses on stability, friendlier diagnostics, and CLI quality-of-life.

Special thanks to @TheRustyPickle, @ducdetronquito, @pt2302, @akmalsoliev and every reviewer, tester and bug-reporter who helped make this release!


✨ New & Improved

Area What’s new
Diagnostics & error messages •We now print a snippet of source code in each message, highlighting the error location. You can control error message verbosity with the new --output-format=min-text and --output-format=full-text options.
•Add tests to keep Error Kinds in sync with documentation, in addition to reclassifying Error Kinds previously reported as Unknown (#477).
• Import errors are now shown on separate lines with source hints, thanks to the new BindingsBuilder::error_multiline helper (commit 2bba00f).
TypeVar reveal output is shorter and clearer – no more variance=PInvariant noise (#225).
Editor support •Basic support for Semantic Highlighting, a highly requested feature (#218). More improvements to come in future releases.
Configuration / CLI • New flags --replace-imports-with-any and --ignore-missing-source let you suppress noisy import errors without editing config files (#480 → closes #460 & #462).
Type-system smarts • Conflicting Required/NotRequired qualifiers in a single TypedDict field now surface an explicit error (#447→ fixes #414).
Project workflow pyrefly init edits an existing pyproject.toml in-place instead of appending duplicate [tool.pyrefly] sections (#336).

🐛 Other notable bug fixes

  • Panics fixed:
    • Missing NoneType stub when running with --python-version 3.9 (#56).
    • Starred targets in augmented assignments no longer crash the checker (#468).
  • Hover & go-to-definition no longer crash the LSP on keyword-only or pattern-match bindings.
  • Build is quiet again on nightly Rust; cleaned up stray clippy warnings.

🚨 Potentially breaking

  • Flag & message renames – some diagnostics switched from snake-case to kebab-case and new CLI flags were introduced (#480). Update any scripts that parse pyrefly check --help or grep error kinds.
  • The TypedDict qualifier rule (#447) may surface new errors where both Required and NotRequired were previously accepted.

📦 Upgrade

pip install --upgrade pyrefly==0.20.0

🖊️ Contributors in this release

@rchen152, @grievejia, @stroxler, @ajaymiranda, @connernilsen, @pt2302, @kinto0, @yangdanny97, @ndmitchell, @migeed-z, @hugovk, @dtolnay, @Alex-Aron, @Adist319, @zachmullen, @grantlouisherman, @rubmary, @dluo, @MaggieMoss, @kinto0, @SamChou19815

Don't miss a new pyrefly release

NewReleases is sending notifications on new releases.