github facebook/pyrefly 0.32.0
Pyrefly v0.32.0

18 hours ago

Status : ALPHA
Release date: 08 September 2025

Pyrefly v0.32.0 bundles 70 commits from 18 contributors


🚨Major Change for IDE extension

With this release type errors are now disabled by default in IDE when there is no config present ( in pyrefly.toml or pyproject.toml). This change was made based on feedback that displaying type errors by default in the IDE (i.e. red squiggles) was a nuisance for new users, especially those looking only for language services. Users are still able to enable type checking without a configuration file if they wish by updating their config (either in their pyproject.toml, pyrefly.toml or VSCode settings):

# to enable type errors
"python.pyrefly.displayTypeErrors": "force-on"

✨ New & Improved

Area What’s new
Type Checker Behavior - Implicit return validation is now performed even when untyped-def-behavior is set to check-and-infer-return-any for functions with explicit return annotations. This fixes a conflation issue where return type inference being disabled also disabled implicit return validation.

- Improved handling of calls on type[...] including cls (typed as type[Self]).

- Deprecation warnings are now emitted when a deprecated function is referred to, not just called. Scoping for class fields in nested scopes is now correctly handled.
IDE Integration - Type errors now disabled by default in IDE (see details above).

- Users can now see in their IDE status bar whether the current file has type errors enabled/disabled

- Improved hover for Union types, so hover display now merges identical elements.
Build Systems & Security - Further improvements made to emulate Buck’s build system file mappings within Pyrefly. This improves Pyrefly's integration with various build systems in OSS and IDEs, though build system support is still in progress.

- The tracing-subscriber crate was updated from 0.3.19 to 0.3.20 to fix RUSTSEC-2025-0055, addressing a vulnerability related to ANSI escape sequence injection attacks in logs.

🐛 Other bug fixes

We’ve closed 10 bug issues since our last minor release 👏

  • #1036 - class property on enums incorrectly typed as Literal
  • #1016 - pyrefly process not terminating and consuming significant CPU and memory
  • #977 - issue handling attributes in dataclasses
  • panics resolved: #509, #962
  • Other bugs fixed: #980, #647, #264

Thank-you to all our contributors who found these bugs and reported them! Did you know this is one of the most helpful contributions you can make to an open-source project? If you find any bugs in Pyrefly we want to know about them! Please open a bug report issue here


📦 Upgrade

pip install --upgrade pyrefly==0.32.0

How to safely upgrade your codebase

Upgrading the version of Pyrefly you're using or a third-party library you depend on can reveal new type errors in your code. Fixing them all at once is often unrealistic. We've written scripts to help you temporarily silence them. After upgrading, follow these steps:

  1. pyrefly check --suppress-errors
  2. run your code formatter of choice
  3. pyrefly check --remove-unused-ignores
  4. Repeat until you achieve a clean formatting run and a clean type check.

This will add # pyrefly: ignore comments to your code, enabling you to silence errors and return to fix them later. This can make the process of upgrading a large codebase much more manageable.

Read more about error suppressions in the Pyefly documentation


🖊️ Contributors this release

@rchen152, @dtolnay, @kinto0, @samwgoldman, @SamChou19815, @grievejia, @migeed-z, @yangdanny97, @arthaud, @tianhan0, @AryanBagade, @asukaminato0721, Carlos Fernandez, @connernilsen , @fangyi-zhou , @hashiranhar, @VladimirMakaev

Don't miss a new pyrefly release

NewReleases is sending notifications on new releases.