github facebook/pyrefly 0.34.0
Pyrefly v0.34.0

10 hours ago

Status : ALPHA
Release date: 22 September 2025

Pyrefly v0.34.0 bundles 180 commits from 22 contributors.


✨ New & Improved

Area What’s new
Type Parameter Handling - Significant refactoring of internal logic for handling uninitialised variables, resolving multiple bugs in the process

- Support added for referring to imported legacy TypeVars by their fully qualified name (see example in sandbox)

- Support added for implementing protocols with generic methods.
IDE - IDE logic has been refactored to limit concurrent recheck and find-references tasks, preventing excessive thread spawning under heavy workload and improving overall IDE responsiveness.

- IDE autocomplete now displays if a method or function is deprecated�

-IDE autocomplete now escapes single quotes (’’) for autocomplete
Pyrefly Configs - Users can now use negation when setting replace-imports-with-any . Eg. replace-imports-with-any: ["!sympy.printer", "sympy.*"] will replace any sympy imports with Any EXCEPT for sympy printer imports
Error Messaging
- Improved how overload signatures in error messages are displayed to avoid printing confusing upper bounds of TypeVars
Documentation
- IDE documentation updated to include Jupyter Lab information and improved inlay hint instructions.

🐛 bug fixes

We closed 21 bug issues this release 👏

  • #1058 - abstractmethod decorated functions issue caused literal types in signatures to be promoted incorrectly
  • Addressed issue that caused false positives when using the jaxtyping library: #925
  • Addressed multiple issues relating to TypeVars: #1050, #912, #129
  • Addressed multiple issues with IDE autocomplete: #1095, #986, #798
  • #200 - pyrefly --watch CLI command now works again!
  • Other issues: #1073, #947, #936, #829, #825, #724, #698, #680, #604, #429, #340, #114, #111

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.34.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, @tianhan0, @ndmitchell, @yangdanny97, @stroxler, @arthaud, @SamChou19815, @grievejia, @javabster, @connernilsen, @cooperlees , @dluo, @dtolnay, @fangyi-zhou, @kinto0, @maggiemoss, Paul Iatchenii, @samwgoldman, @sandeshbhusal, @VladimirMakaev, @migeed-z

Don't miss a new pyrefly release

NewReleases is sending notifications on new releases.