Releases: facebook/pyrefly
Pyrefly v0.26.0
Status: ALPHA
Release date: 2025-07-28
Pyrefly 0.26.0 bundles 179 commits from 24 contributors
📝 Changelog
Configuration
- Added a "disable-search-path-heuristics" to disable search path heuristics for users that want to configure all imports manually.
- Fixed issues with the --watch flag.
- Support .pyx, .pyd, and .pyw compiled files for module finding and globbing.
- Disabled imports from pycache to prevent incorrect imports.
Typechecking Features
- Fix several bugs with variable scopes.
- Warn on calling deprecated overloads.
- Added support for checking code snippets directly from the command line.
- Disallowed attribute assignment or deletion on super() objects.
- Emit an error when an uncalled function is used as the condition for an if statement.
- Improved new and init_subclass behavior.
- Enabled support for descriptors in dataclass fields.
- Fixed bugs related to TypedDict operations, including setitem and matching against PartialTypedDict.
- Fix bug with synthesized namedtuple constructors.
IDE
- Optimized autocomplete by filtering local variable results and providing a specialized path for builtins, effectively improving auto-import behavior.
Other
- Enhanced performance with caching for node packages and rust-cache.
- Improved display of default values and type information.
- Improved subscript error messages to indicate non-subscriptable types.
- Summary display is now more concise by default, with options for detailed or no summary.
📦 Upgrade
pip install --upgrade pyrefly==0.26.0
🖊️ Contributors this release
@grievejia @samwgoldman @stroxler @rchen152 @fangyi-zhou @ndmitchell @rubmary @kinto0 @arthaud @lolpack @migeed-z @darricklaidin @connernilsen @regexyl @danielocfb @WeixiMa @MaggieMoss @yangdanny97
Full Changelog: https://github.com/facebook/pyrefly/compare/0.25.0..0.26.0
Pyrefly v0.25.0
Status: ALPHA
Release date: 2025-07-22
Pyrefly 0.25.0 bundles 307 commits from 19 contributors
📝 Changelog
- Error Handling Improvements:
- Avoid redundant error messages for positional arguments.
- Show environment query errors and config loading errors in IDE.
- Class and Attribute Handling:
- Changed semantics of class objects initialized on class bodies.
- Improved handling of read-only class attributes.
- IDE Enhancements:
- Support for "jump to definition" on hover.
- Optimized module path sorting.
- Type System Enhancements:
- Improve handling for
typing.Self
.
- Improve handling for
- Configuration and Migration:
- Added support for
ignore_missing_imports
in Pyrefly config. - Improved config migration logic and added tests for various config options.
- Added support for
- Error and Warning Enhancements:
- Warn on deprecated method calls and overloaded calls.
- Improve error labeling and severity-based color coding.
- TypedDict Improvements:
- Check keyword arguments in
TypedDict
initialization & makeself
positional-only.
- Check keyword arguments in
- Documentation and Usability:
- Updated documentation for IDE settings and config options.
- Miscellaneous:
- Raise error on variable use-before-assignment.
- Improved mutable capture for global and nonlocal variables.
📦 Upgrade
pip install --upgrade pyrefly==0.25.0
🖊️ Contributors this release
@rchen152 @stroxler @ndmitchell @yangdanny97 @arthaud @kinto0 @connernilsen @SamChou19815 @rubmary @dluo @migeed-z @samwgoldman @fangyi-zhou @LyricalToxic @melvinhe @grievejia @lolpack
Full Changelog: 0.24.2...0.25.0
Pyrefly v0.24.2
Status: ALPHA
Release date: 2025-07-15
Pyrefly 0.24.2 bundles 290 commits from 26 contributors
📝 Changelog
- Type System Enhancements: Improved handling of
type()
andbool()
for narrowing, and the behavior for match statements w/ class patterns - Dataclass Transform: Full support for
dataclass_transform
- Interpreter Query Optimization: Significant reduction in import times and memory usage by optimizing search path handling and deduplication of search path entries.
- Error Handling and Reporting: Introduced CLI flags to configure error severity for individual error codes (
--error
,--warn
,--ignore
) and improved error message clarity. - Semantic Tokens: Fixed issues with semantic tokens on the first line and improved deduplication logic.
- Binop Support: Fixed issues with operations like
float * bool
andcomplex * bool
. - Workspace Symbols: Implemented workspace symbol support using the fuzzy search infrastructure for auto-import.
- Configuration Improvements: Added
--typeshed-path
CLI flag for custom typeshed modifications and improved config handling logic.
📦 Upgrade
pip install --upgrade pyrefly==0.24.2
🖊️ Contributors this release
@ndmitchell, @yangdanny97, @stroxler, @rchen152, @migeed-z, @connernilsen, @dluo, @MaggieMoss, @rubmary, @xaskii, @kinto0, @grievejia, @SamChou19815, @melvinhe, @lianne, @krikera, @dluo, @Abel981, @fangyi-zhou, @Alex-Aron, @zpao, @slawlor, @diliop, @arnav-jain1, @samwgoldman
v0.23.0
Pyrefly 0.23.0
Status: ALPHA
Release date: 2025-07-07
Pyrefly 0.23.0 bundles 186 commits from 24 contributors. This release introduces significant improvements in type checking, configuration handling, and error management.
📝 Changelog
- Dataclass improvements: Added checks for dataclas field ordering, keyword arguments, and inheritance, aligning with Python's typing specification. Started implementing support for dataclass transforms.
- Error Handling and Suppression: Introduced more robust error handling and suppression options. Error suppression comments can now specify the type of error being suppressed, and are less sensitive to whitespace.
- Go-to-def Enhancements: Added support for resolving a single goto-def request to multiple definitions.
- Configuration and Environment Updates: Better error reporting and support for conda environments.
- Jupyter Notebook Integration: Pyrefly can now work on notebooks in Jupyter Lab, via the jupyterlab-lsp extension.
📦 Upgrade
pip install --upgrade pyrefly==0.23.0
🖊️ Contributors this release
@aahanaggarwal, @yangdanny97, @stroxler, @rchen152, @dluo, @ndmitchell, @connernilsen, @xaskii, @melvinhe, @migeed-z, @TheRustyPickle, @arnav-jain1, @InSyncWithFoo, @rubmary, @arthaud, @samwgoldman, @grievejia, @danielocfb-test, @MaggieMoss, @DavidTolnay, @junhao, @darricklaidin, @kinto0
v0.22.0
Pyrefly 0.22.0
Status : ALPHA
Release date: 30 Jun 2025
Pyrefly 0.22.0 bundles 216 commits from 23 contributors. This release includes significant improvements in type checking and performance enhancements.
✨ New & Improved
Area | What’s new |
---|---|
Type Checking | Implemented support for functools.total_ordering , allowing automatic generation of rich comparison methods. |
IDE / LSP | Added support for textDocument/rename and textDocument/prepareRename in LSP. |
Configuration | Introduced CLI flag for --conda-environment to manage Python environments more effectively. |
🐛 Other bug fixes
- Fixed bugs in attribute narrowing and method overrides.
- Resolved issues with
NamedTuple
field ordering andTypedDict
method synthesis. - Values with
type[tuple]
can now be used as a tuple constructor - Enums can now be subscripted with any
str
, not just literals.
📦 Upgrade
pip install --upgrade pyrefly==0.22.0
🖊️ Contributors this release
@Adist319, @adsi7698, @bigfootjon, @connernilsen, @CookieComputing, @dluo, @facebook-github-bot, @fangyi-zhou, @grievejia, @iwakitakuma33, @kinto0, @krathul, @melvinhe, @migeed-z, @ndmitchell, @pt2302, @rchen152, @SamChou19815, @stroxler, @vagabond-0, @xaskii, @yangdanny97, @zsol
Previous Release Notes
https://github.com/facebook/pyrefly/releases
Full Changelog: 0.21.0...0.22.0
v0.21.0
Pyrefly 0.21.0
Status : ALPHA
Release date: 23 June 2025
Pyrefly 0.21.0 delivers 176 commits from 20 contributors. We now support a number of highly requested features such as Semantic Highlighting, Signature Help, Document Highlights and Auto Import Completions! Follow along for more LSP functionality #344 ahead of our V1 release.
✨ New & Improved
Area | What’s new |
---|---|
IDE / LSP (Issue #344) | • Richer semantic highlighting – method calls, property accesses, and the expressions nested in them now get distinct token types, so editors like VS Code underline exactly what you expect (#344). • Added the defaultLibrary semantic-token modifier for symbols originating from builtins , typing , or typing_extensions ; makes built-ins stand out in both dark/light themes. |
Diagnostics | • Detailed override errors – incompatibilities between a subclass attribute and its parent now explain why they don’t match (“read-write vs read-only”, “int vs str”, etc.) on a second indented line. |
Type-system smarts | • InitVar fields in @dataclass definitions are no longer treated as instance attributes, eliminating false “missing attribute” errors (PR [#437]). • Full support for Variance Inference in Generic Classes with PEP 695 |
Performance | • A pathological Callable | … union test that once blew up exponentially now checks in linear time. |
🐛 Other bug fixes
- Multiple edge-case panics removed, including starred targets inside augmented assignments and cyclic class-type substitutions.
- Hover & go-to-definition in LSP no longer crash when traversing keyword-only or pattern-match bindings.
- Cargo / Rust nightly warnings cleaned up; WASM build green again.
🚨 Potentially breaking
- The new, more explicit override-mismatch diagnostics may fail code that relied on silent attribute-type changes.
- Editors that hard-code semantic-token kinds should be updated to recognise the new
defaultLibrary
modifier.
📦 Upgrade
pip install --upgrade pyrefly==0.21.0
🖊️ Contributors this release
@yangdanny97 @Adist319 @grievejia @connernilsen @migeed-z @ndmitchell @xl4624 @stroxler @rchen152 @TheRustyPickle @dluo @kinto0 @pt2302 @SamChou19815 @ducdetronquito @xaskii @Alex-Aron @hugovk @grantlouisherman @rubmary
v0.20.0
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:
- 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 bothRequired
andNotRequired
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
v0.19.0
Pyrefly 0.19.0
Status : ALPHA
Release date: 9 June 2025
Pyrefly 0.19.0 packs a week’s worth of fixes and quality‑of‑life improvements into 128 commits from 19 contributors, touching 153 files.
Thank you @ajaymiranda @Adist319 @Alex-Aron @zachmullen for your contributions!
✨ New & Improved
Area | What’s new |
---|---|
Editor support | • Neovim integration — first‑class LSP support plus a helper command to install/update the server (#227). • Neovim now respects pyrefly.toml and remote config overrides (#442). |
Configuration UX | • Eliminates misleading “Extra keys” parse errors in pyrefly.toml (#441). • Added validation that a TypedDict field cannot be both Required and NotRequired (#414). |
Diagnostics | • reveal_type messages are now INFO‑level instead of errors, so they no longer fail CI runs when you’re just inspecting types (#304).• isinstance() checks involving Union[...] are now inferred correctly (#426). |
Type‑system smarts | • Better handling of Self generics in chained method calls (#152).• Fixed constrained TypeVar attribute access (#318).• Fixed failure when calling methods on a plain TypeVar (#150). |
Stub & third‑party typing | • Works with inline stub files that live beside their implementation (#419). • Correctly recognises pandas-stubs generic aliases such as Index without type arguments (#427). |
🐛 Other notable bug fixes
- Duplicate “NoReturn / Never” return‑annotation error reduced to a single authoritative report (#425).
- Numerous minor LSP crashes and hover glitches fixed.
- Documentation on website and CLI cleanup
🚨 Potentially breaking
- The new
TypedDict
qualifier rule (#414) will surface errors in code that previously passed silently. - If you relied on
reveal_type
raising an error exit status, update scripts to look for an info‑level diagnostic instead (#304).
📦 Upgrade
pip install --upgrade pyrefly==0.19.0
🖊️ Contributors in this release
@Adist319, @Alex-Aron, @connernilsen, @yangdanny97, @dluo , @dtolnay, @hugovk, @grantlouisherman, @grievejia, @kinto0, @MaggieMoss, @ndmitchell, @rchen152, @rubmary, @SamChou19815, @stroxler, @migeed-z