Pyrefly v0.36.0
Status : ALPHA
Release date: 2025-10-06
Pyrefly v0.36.0 bundles 150 commits from 23 contributors. This release brings major improvements to performance, type checking, and Pydantic/Django support, along with numerous bug fixes and a brand new baseline feature.
✨ New & Improved
Area | What’s new |
---|---|
Performance | With #360 solved, Pyrefly is much faster on projects & environments with a large number of dependencies. |
Baseline Feature | A new experimental baseline mechanism to store existing errors in a separate file. See the docs for more info. |
Control Flow & Type Narrowing | Major improvements to how we model control flow and type narrowing, reducing false-positive errors. Builtin types can now be narrowed to literals in more situations. |
LiteralString | Added support for LiteralString in format(), join(), and replace() methods. |
Pydantic | Enhancements and bug fixes were made to the experimental Pydantic support released last month. Pydantic's docs now contains documentation for how to use Pyrefly with Pydantic! |
Django | Progress on experimental support for Django fields and enums. |
IDE | Bug fixes for auto-import quick fix, improved hover info format to improve readability, reduce clutter, and enable syntax highlighting for function types. |
Sandbox | Browser sandbox now supports Python stub files (.pyi). |
🐛 Bug Fixes
We closed 20 bug issues this release 👏
#264,#360,#528,#657,#683,#778,#790,#812,#969,#1009,#1022,#1042,#1088,#1162,#1198,#1210,#1218,#1227,#1228,#1235
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.36.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:
pyrefly check --suppress-errors
- run your code formatter of choice
pyrefly check --remove-unused-ignores
- 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 Pyrefly documentation
🖊️ Contributors this release
@stroxler, @arthaud, @samwgoldman, @connernilsen, @migeed-z, @rchen152, @grievejia, @ndmitchell, @yangdanny97, @AryanBagade, @rubmary, @cjlongoria, @simonhollis, @MarcoGorelli, @mohesham88, @Viicos, @Adist319, @airvzxf, @brianrosenfeld, @ivanloskutov, @ahornby, @kinto0
If you need more details on any change, see the full commit log.