Status : ALPHA
Release date: 29 September 2025
Pyrefly v0.35.0 bundles 226 commits from 18 contributors.
✨ New & Improved
Area | What’s new |
---|---|
Configuration | - Improved config finding, preferring Pyrefly configurations in any parent directory to project root marker files. pyproject.toml files are now only considered configurations when a [tool.pyrefly] section is present, otherwise, they are root marker files.
|
Build systems | - Continued work on build system support, primarily Buck. Look out for further updates coming soon! |
Error messages and suppressions | - Improved reveal_type /assert_type error messages to suggest importing from typing when needed, rather than a generic “could not find name” error message - New error kind introduced: inconsistent-overload . This gives overload consistency errors a separate error kind from other invalid overload errors so that users can turn off consistency checks if they wish. suppress-error command now has optional --same-line argument for easier bulk suppression of errors. Instead of adding pyrefly ignore comments on the line above, this flag adds the comment on the same line as where the error is.
|
Security | - upgraded mdbook crate to 0.4.52 to resolve vulnerability with ammonia dependency
|
Third party package support | - Improved handling of optional Pydantic fields (if they are optional we should not require them) - Foundational work to support Django enums |
🐛 bug fixes
We closed 11 bug issues this release 👏
- #1167, #1166 - inaccuracies with
type(x)
returning the wrong thing - #954 - fixed an issue with Pyrefly not recognising
Session
context manager from SQL Alchemy. Fixing this issue brings us one step closer to Pyrefly being full usable SQL Alchemy (follow progress here) - #260 - unions of dunder methods weren’t being recognised correctly
- And more - #1165, #1148, #1146, #1030, #614, #527, #300
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.35.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 Pyefly documentation
🖊️ Contributors this release
@javabster, @samwgoldman, @grievejia, @kinto0, @rchen152 , @yangdanny97, @tianhan0, @stroxler, @SamChou19815, Carlos Fernandez, @cjlongoria, @connernilsen, @maggiemoss, @arthaud, @mohesham88, @VladimirMakaev, @migeed-z