Releases: facebook/pyrefly
Pyrefly v0.49.0
Status : BETA
Release date: 20 January 2026
Pyrefly v0.49.0 bundles 231 commits from 25 contributors.
✨ New & Improved
| Area | What’s new |
|---|---|
| Type Inference | - Partial type inference now possible in loops - Variance inference for self-referential generic types (PEP 695) - typing.Mapping now recognised as a type alias |
| Language Server | - Improved refactoring capabilities for moving module members and lifting local functions/methods to top-level module scope, with automatic import/shim creation. - Hover support for in keyword when used in iteration contexts (for-loops and comprehensions), showing the type of the iterable being iterated over - “Go to symbol” now correctly includes methods inside a class - Enabled clickable inlay hints for built-in types like tuple, dict, str, and special forms (TypeVar, ParamSpec, etc.), allowing users to quickly navigate to type definitions in the IDE |
| Pydantic Support | Added detection and support for pydantic.dataclasses.dataclass decorator, including strict and lax mode support for pydantic dataclasses |
| Error Reporting | Improved error messages for yield, yield from, augmented assignment, missing imports, and missing stubs for better user clarity. |
🐛 bug fixes
We closed 38 bug issues this week 👏
- #2145 - Fixed variance inference incorrectly using
inferred_varianceinstead ofspecified_variancefor stdlib generic classes likeMapping[str, T]. - #1806 - Fixed improper type narrowing and captured variable typing for sequence patterns (e.g.,
[*values]) in match/case statements. - #1697 - Fixed a bug where Pyrefly got confused if a class had the same name as an overloaded method.
- #1494 - Ensures correct overload resolution when promoting nested tuple element literals for unannotated method-initialized attributes.
- And more: #1481, #1472, #1466, #1385, #1341, #1310, #1277, #1234, #1219, #1208, #1013, #1002, #935, #910, #899, #773, #768, #755, #737, #708, #421, #295, #266, #265, #1503, #1616, #1626, #1803, #2051, #2072, #2077, #2107, #2111, #2161
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.49.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
@aaron-ang, @Adist319, @asukaminato0721, @connernilsen, @yangdanny97, @diliop, @fangyi-zhou, Jack, @grievejia, @jvansch1, @Karman-singh15, @kinto0, @arthaud, @ndmitchell, @rchen152, @samwgoldman, @Sehat1137, @stroxler, @tianhan0, @tannguyencse19, @migeed-z
Pyrefly v0.47.0
Status : BETA
Release date: 05 January 2026
Pyrefly v0.47.0 bundles 207 commits from 35 contributors.
✨ New & Improved
| Area | What’s new |
|---|---|
| LSP Features | - Improved autocompletion for keys in .get() on TypedDicts - Improved documentation in hover tooltips for attributes like dataclass fields - Improved import handling: import X as X and from Y import X as X are now recognized as explicit re-exports and not flagged as unused imports. |
| Type Checking | - TypeIs calls now correctly narrow to the intersection of types instead of Never. - Final attributes that are not initialized on the class are now enforced as such. Previously, Final was only enforced if the attribute was initialized on the class. - Improved typing spec conformance by extending reassignment checks for variables declared as Final to additional binding constructs including unpacking, context managers, and loops. |
| Pydantic Support | - Support added for Annotated fields - Pyrefly now validates BaseModel fields at instantiation, catching out-of-range arguments (e.g., Model(x=0) when x must be gt=0). |
| Error Types / Diagnostics | - New error codes non-exhaustive-match warns about incomplete match statements over Enums and unions of literals. - New missing-override-decorator error that is emitted when a method overrides a parent class method but does not have the override decorator. This error is off by default and can be enabled in your .toml configuration - Pyrefly now suggests the closest stdlib module name for mistyped imports (e.g., import jsn → Did you mean 'json'?). |
🐛 bug fixes
We closed 34 bug issues this release 👏
- #1952 - Allow
typing_extensionsfortypingmodule special callables. - #1906 - The single-underscore function
_is now correctly exported from custom builtins for i18n support. - #1905 - Fixed stack overflow panic in protocol conformance check involving recursive
Foralltypes and method lookups. - #1784 - Fixed subtype checking for
LiteralStringandCollection. - #1723 - Ignore
textDocument/didClosefor notebooks and vice versa in the LSP server. - #1597 - Type narrowing now uses intersection logic, preventing overly strict type errors.
- #1375 - Improved support for
object.__new__(C)which was previously incorrectly inferring the type asobject. - #1086 - Autocomplete for string
Literalvalues no longer inserts redundant quotes when completing inside a string literal. - And more: #1048, #880, #844, #821, #792, #504, #1274, #1271, #1213, #1209, #1091, #1393, #1659, #1657, #1603, #1783, #1758, #1903, #1880, #1856, #1791, #1948, #1910, #1962, #1961
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.47.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
@aleivag, @ArchieBinnie, @AryanBagade, @asukaminato0721, Bharath Sundararaj, Brian Chien, Cédric Barreteau, @connernilsen, @yangdanny97, @dtolnay, @fangyi-zhou, @gvozdvmozgu, @jackulau, @grievejia, @jvansch1, @Karman-singh15, @kinto0, @martindemello, @arthaud, @nikita-ashihmin, @nitinsingh-meta, @rchen152, @kitagry, @salmanmkc, @samwgoldman, @ska-kialo, @stroxler, Tatiana Ber, @tannguyencse19, @zanieb, @migeed-z
Pyrefly v0.46.0
Status : BETA
Release date: December 15, 2025
Pyrefly v0.46.0 bundles 125 commits from 19 contributors.
✨ New & Improved
| Area | What’s new |
|---|---|
| Language Server | - Call Hierarchy support for the Pyrefly LSP server now implemented. This is a fundamental IDE feature that allows users to explore function call relationships in your IDE. - Function documentation now available in signature help - Signature help now uses single-line labels, thereby maintaining compatibility with editors that don't support multi-line labels while still keeping hover tooltips readable - Variables defined in ALL_CAPS are now correctly highlighted as constants in VSCode and the website sandbox. |
| Type Checking | Implemented PEP 765 warnings. The checker now warns if return, break, or continue statements directly exit a finally block. Starting in Python 3.14, these statements emit a SyntaxWarning because they can silently mask exceptions. |
| Third Party Library Support | - Added third-party stubs for scipy, matplotlib, scikit-learn, scikit-image, vispy, sympy, pandas, conan, botocore, and boto3 to the Pyrefly bundle for better out-of-the-box support for these libraries. - Support for Pydantic “lax mode”. Pyrefly can now model Pydantic’s lax runtime behavior more precisely. As a result, you may see new inferred types such as LaxInt and LaxBool in your IDE, representing the unions of input types that Pydantic accepts at runtime. |
| Errors / Debugging | Debug symbols are now included in release builds, enabling users to generate usable stack traces in crash reports |
🐛 bug fixes
We closed 14 bug issues this release 👏
- #1826 - Fixed panic/crash caused by capacity overflow with large tuple expansion.
- #1809 - Fixed
__future__imports being incorrectly flagged as unused, as they have necessary module-level side effects. - #1794 - Fixed a panic/crash when a text range calculation exceeded the document buffer size limit.
- #1418 - Fixed function hover popups (especially in
numpy) missing the function name in the header when resolving from stub files. - #1289 -Fixed special casing for numba jit decorators (corrected path handling).
- And more: #1348, #1214, #820, #253, #1667, #1787, #1799, #1821, #1709
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==v0.46.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, @AryanBagade, @asukaminato0721, @connernilsen, @DanielNoord, @yangdanny97, @dearfl, @fangyi-zhou, Jack, @jvansch1, @kinto0, Liam, @arthaud, @rchen152, @samwgoldman, @stroxler, @tianhan0, @migeed-z
Pyrefly v0.45.0
Status : BETA
Release date: 08 December 2025
Pyrefly v0.45.0 bundles 146 commits from 21 contributors.
✨ New & Improved
| Area | What’s new |
|---|---|
| Type Checking | - For dict literals without a contextual hint Pyrefly will now infer an anonymous typed dict. This reduces false positives when unpacking a heterogeneous dict as kwargs. - Better suggestions hints for name and attribute errors (e.g. suggesting fixes to one letter errors like my_variuble → my_variable). - Callable types are now narrowed more intuitively, especially in isinstance checks. Callable Enums are also now supported - New check added (defaults to warn) for comparisons where the result is predictable or the comparison inappropriate (e.g. True is False). Reflects basic support for Pyright’s reportUnnecessaryComparison and Mypy’s comparison-overlap check. |
| Language Server | Automatic file renaming improved to allow editable third party packages to be renamed |
| Third Party Package Support | - Support for Pydantic lax mode has been extended to include support for container types (lists, dicts etc.) - All Django fields now support nullability, fixing issues with TextField and others - Pyrefly will now correctly infer the signature for functions decorated with numba.jit and numba.njit |
🐛 bug fixes
We closed 19 bug issues this release 👏
- #1736 - Fixed prepareRename LSP request to allow renaming of symbols from editable packages
- #1732 - Fixed handling of await inside async comprehensions at module scope
- #1686 - Fixed highlighting for Chinese and other multi-byte characters by using UTF-16 encoding for semantic token offsets
- #1632 - Fixed tracking of unresolvable modules, ensuring type errors are updated when import errors change
- #1565 - Fixed false positive type errors in nested loops by correctly handling
LoopRecursivevariables in type checking. - #204 - Fixed missing error when
__all__is not implemented, now validating user-defined__all__entries and emitting errors for missing module attributes - And more: #1773, #1765, #1742, #1739, #1720, #1698, #1624, #1479, #1475, #1325, #1289, #974, #548
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.45.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
@stroxler, @migeed-z, @rchen152, @yangdanny97, @samwgoldman, @connernilsen, @asukaminato0721, @kinto0, @grievejia, @arthaud, @AryanBagade, @lolpack, @ndmitchell, @gvozdvmozgu, @javabster, @KaranPradhan266, @jvansch1, @tianhan0, Owen Valentine, Vladimir Matveev
Pyrefly v0.44.0
Status : BETA
Release date: 03 December 2025
Pyrefly v0.44.0 bundles 163 commits from 23 contributors.
✨ New & Improved
| Area | What’s new |
|---|---|
| LSP / IDE | - Inlay hints are now clickable, allowing Go-To-Definition for class and type names (e.g., List or T) directly from the hint overlay. - Completions are now disabled inside comments and string literals to reduce noise and improve user experience. |
| Type checking | - Recursive type solving logic was significantly refactored, enabling more reliable type inference and bug fixes around self-referential types. - Bundled typeshed and third-party stubs have been updated, improving compatibility and type checking for more libraries |
| Pydantic/Dataclass | - Added support for Pydantic range constraints (e.g., pydantic.types.PositiveInt). - New infrastructure introduced to better support Pydantic lax mode - Support added for the Decimal type. |
| Error Handling | Error suppressions are now stricter, only applying when the suppression comment is on the start line, reducing false negatives |
🐛 bug fixes
We closed 11 bug issues this release 👏
- #1692 - fixed an issue where args and kwargs of wrapper functions were wrongly reported as not subscriptable
- #1665 - Prevents unnecessary
Literal[...]tooltips when hovering over docstrings. - #1559 - Updated dependencies to pull in fix for ruff parser that was causing Pyrefly to crash in jupyter notebooks
- #1372 - resolved issue with inherited properties incorrectly being overridden by assignment
- And more: #1371, #1035, #1675, #1701, #1688, #1710, #1719
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==v0.44.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](https://pyrefly.org/en/docs/error-suppressions/)
🖊️ Contributors this release
@arthaud, @asukaminato0721 , @connernilsen , @diliop , @fangyi-zhou , @grievejia , @gvozdvmozgu, @Imran-S-heikh, @javabster , @kinto0 , @kshitijgetsac, @migeed-z, @ndmitchell, @ogios, @rchen152, @simonhollis, @stroxler, @yangdanny97, Carlos Fernandez, @dtolnay, @jvansch1, @tianhan0
Pyrefly v0.43.0
Status : BETA
Release date: 24 November 2025
Pyrefly v0.43.0 bundles 213 commits from 24 contributors.
✨ New & Improved
| Area | What’s new |
|---|---|
| IDE/LSP Features | - New warnings for unused imports and unused variables - Pyrefly LSP features now apply to Python documents with the inmemory schema, improving support for interactive consoles and temporary code cells in IDEs like Positron. - Added a configuration option to control whether "Go to definition" links appear in hover tooltips, enabled by default |
| Type Checker | Improved support for unpacking tuple[*Ts], fixing cases where unpacking would previously degrade to object If a TypeVarTuple-annotated varargs is unmatched, it now resolves to an empty tuple in all cases |
| Error Messages | - New --enabled-ignores command line flag and configuration option allow specifying exactly which tools’ ignore comments (e.g., # pyright: ignore) pyrefly respects - CLI flags like --error, --warn, etc., now accept comma-separated lists, making it easier to enable or disable multiple error codes at once. |
| Pydantic Support | Improved handling of RootModel types, including nested and union scenarios. Basic support for Pydantic BaseSettings. Fields in BaseSettings are now treated as optional by default. |
🐛 bug fixes
We closed 17 bug issues this week 👏
- #1642 -
TypedDictswith any required keys are now correctly treated as always truthy, allowing for proper type narrowing in boolean expressions - #1611- correctly detects
awaitin nested generator expressions, preventing them from being incorrectly typed asGeneratorinstead ofAsyncGenerator. - #1609 - fixed a bug where positional argument inlay hints for callables with
*argswould show incorrect positions or duplicates - #1598 - Literal strings now correctly participate in protocol subset checks (e.g., against
typing.Container), fixing an issue with type signature mismatch - #1462 - Allow referencing inherited attributes from a class body's top level.
- #1256 - fixes crash when the walrus operator (
:=) appears in annotation positions - #273 - correctly handles
tuple[()] | tuple[int, *tuple[int, ...]]to simplify totuple[int, ...]. - And more: #1644, #1635, #1633, #1631, #1625, #1604, #1268, #1230, #1016, #981
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.43.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](https://pyrefly.org/en/docs/error-suppressions/)
🖊️ Contributors this release
@javabster, @AryanBagade, @asukaminato0721, @austin3dickey, @yangdanny97, Dhruv Mongia, @fangyi-zhou, @Imran-S-heikh, @grievejia, @jvansch1, @keito, @kshitijgetsac, @kinto0, @arthaud, @nathan-liyiming, @rchen152, Ron Mordechai, @samwgoldman, @cybardev, @stroxler, @tianhan0, @vinnymeller, @migeed-z
Pyrefly v0.42.0 - BETA
Status : BETA 🎉
Release date: 17 Nov 2025
🚀Pyrefly is now in Beta!
We’re thrilled to announce with this release that Pyrefly has transitioned from Alpha to Beta status! This marks a new chapter for the project, with increased stability, feature maturity, and readiness for broader adoption. When using a version of Pyrefly with Beta status you can feel confident that the IDE extension is ready for production use, while core type-checking features can be used, but be aware some edge cases are still being addressed as we make progress towards a later stable v1 release (bug reports welcome!).
These release notes will use a slightly different format than usual, covering the major highlights of the last 6 months that have contributed to this milestone.
🏆 Major Highlights from Alpha Releases
1. IDE & Language Server Features
- Instant IDE Startup: Major performance improvements for large environments.
- Semantic Highlighting, Inlay Hints: Enhanced code readability and added highlighting for unreachable blocks and unused function parameters. Unnecessary/obvious inlay hints are no longer displayed.
- Hover Cards & Docstrings: Richer information in tooltips, including docstrings for built-in types and links to error documentation.
- Configurable LSP Features: Greater control over enabling/disabling IDE features like autocomplete, go-to-definition, and hover.
- Extensions released for a range of popular IDEs, including VSCode, PyCharm and more!
- Some relevant issues: #853, #1403, #1335, #873, #802, #716
2. Type Checking Enhancements
- Improved overload evaluation: Fully compliant with the Python typing spec
- Smarter Type Narrowing: Improved handling of variable types in loops, control flow, and pattern matching. Added ability to understand patterns like `getattr()`, `hasattr()`, and `dict.get()`
TypedDict& Protocol Improvements: More accurate type checking for structural types, including handling for union keys and improved inheritance checks.- Additional Python typing features:
LiteralString&TypeAliasTypesupport, abstract class instantiation checks, unused awaitable checks, multiple inheritance consistency checks, and more! - Configurable Type Inference: Advanced features like empty container inference and return type inference can be toggled via config.
- Some relevant issues: #684, #872, #1058, #940, #815, #1461, #44
3. Error Reporting & Suppression
- Granular Error Filtering: Filter summarized errors by code, set error severity, and get clickable links to docs.
- Suppression Workflow: Scripts and commands to silence new errors after upgrades, making large codebase migrations manageable.
- Improved Error Messages: Clearer, more actionable diagnostics for overloads, missing imports, and more.
- Some relevant issues: #1276, #1302, #890, #1401
4. Framework Integrations
- Django: Partial support, with ongoing improvements for model field inference, enum support, and lazy label handling.
- Pydantic: Experimental support, with growing documentation and bug fixes.
- Some relevant issues: #316, #334, #1276, #839
5. Jupyter Notebook Support (Experimental)
- Full Language Server Integration: Diagnostics, inlay hints, go-to-definition, hover, semantic tokens, signature help, and completions now work out-of-the-box for .ipynb files.
- CLI Type Checking for Notebooks
- Jupyter Lab Integration
- Some relevant issues: #381, #591, #1045, #1529, #925
6. Build Systems, Dependencies & Configuration
- Initial Build System Support: Foundational work for Buck and other build systems to support generated file materialization and source file remapping
- Editable Installs: Documentation and support for working with editable dependencies.
- Improved dependency handling: performance improvements and automatic recognition of third party libraries with typeshed stubs
- Some relevant issues: #573, #1, #2, #1239, #360
Check out the Pyrefly documentation for more details on how to use each of these features.
💡 What does Beta status mean for you?
The Beta release is your invitation to start using Pyrefly in real-world projects, provide feedback, and continue helping shape its future. You do not need to change how you install and upgrade Pyrefly now that we are in Beta status, the same semantic versioning format will remain in place.
You can continue providing feedback as usual by opening a GitHub issue or joining our Discord server. In this new phase of development as we push towards our next milestone (a stable v1.0 release) we are particularly interested in hearing about how you are using Pyrefly in real production environments, including any edge cases you may encounter.
📦 Upgrade
pip install --upgrade pyrefly==0.42.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
📅What’s next?
Going forward we’ll be continuing development work the same as usual with weekly releases of new features and bug fixes. However we will be closing out our Beta milestone and moving on to the next - a stable V1 Release. We’ll be continuing to listen to your feedback and address open issues, so if there are specific things you want to see in a stable release, or blockers for adopting Pyrefly in your project - let us know!
🖊️ Thank-you to all our contributors!
The following people have directly contributed at least once to the development of Pyrefly since our first Alpha release. Together we’ve closed almost 800 issues and made over 9,000 commits 😱 We want to sincerely thank everyone who has taken the time to make a contribution, large or small, and look forward to our continued collaboration on future releases.
@aahanaggarwal, @aaron-ang, @lolpack, @arosenber, @javabster, @abdallhfattah, Abel, @abhi-jha, @Adist319, Aditya Sinha, @Adamkaram, @ajaymiranda, @akmalsoliev, Alex, @Alex-Aron, @ahornby, Alexander Mols, Ali Tayyebi, @alokpr, @gvozdvmozgu, Anqi Wu, Arnav, @AryanBagade, @asukaminato0721, @krathul, Ben Carr, Brian Rosenfeld, @capickett, Carlos Fernandez, @charliecloudberry, @cclauss, @cjlongoria, @connernilsen, @cooperlees, Daniel Mueller, @yangdanny97, @darricklaidin, @dluo, @dtolnay, Dhruv Mongia, @kv9898, @diliop, @Dogacel, @ducdetronquito, Eric J Nguyen, @fangyi-zhou, @fatelei, @Zeko369, Grant Herman, @gvozdvmozgu, @hashiranhar, @fannheyward, @hugovk, @IDrokin117, @immanuel-peter, @InSyncWithFoo, @airvzxf, Ivan Loskutov, @jack-mcivor, @JakobDegen, @j-piasecki, @jagill, @jchanke, @grievejia, @jvansch1, @bigfootjon, Jun Hao, Kc Balusu, @CookieComputing, kitek, @krikera, @kshitijgetsac, @kinto0, Li Shen, lianne, LyricalToxic, @maggiemoss, @MarcoGorelli, @markmarkmarkthebest, @martindemello, @yamgent, @arthaud, @melvinhe, Miae Kim, @michaelcortese, Miyamoto Musashi, @mohesham88, @mrsobakin, Nathan Hawkes, @ndmitchell, @NSPC911, @oriori1703, Paul Iatchenii, @zpao, @pavelzw, @pawelstrzmeta, @prasannavenkateshgit, @pt2302, @rchen152, @regexyl, @ricardoleal20, @rchiodo, Ron Mordechai, @rubmary, @TheRustyPickle, @salvatorebenedetto, @samwgoldman, @SamChou19815, @sandeshbhusal, @sargun, @slawlor, @singiamtel, @stroxler, Takuma Iwaki, @Solumin, Thomas Polasek, @tianhan0, @Viicos, @VladimirMakaev, @WeixiMa, @Wilfred, Willy Lau, @xaskii, Xiaomin Liu, Yotam DK, @zachmullen, Zach Riser, @migeed-z, @LycheeBay, Zoltán Nagy, @zsol
Pyrefly v0.41.0
Status : ALPHA
Release date: 10 November 2025
Pyrefly v0.41.0 bundles 166 commits from 22 contributors.
✨ New & Improved
| Area | What’s new |
|---|---|
| Jupyter Notebook support | - Extensive improvements for language server support in Jupyter Notebooks including diagnostics (red squiggles), inlay hints, go-to-definition, hover, semantic tokens, signature help, and completions - No extra configuration required to enable language server for notebook files ( .ipynb), they are now included by default. |
| Type Checking | - Pyrefly now correctly models and narrows types for variables reassigned within loops, fixing several long-standing issues (#726, #747). - Improved pattern matching support for certain built-in types, better aligning with typing specification - More accurate type checking for TypedDicts with union keys |
| Language Server | - Hover cards on variables now link to built in types. - Unused parameters are now flagged in IDE Deprecated functions now suggested below non-deprecated ones in auto-completions. - Inlay hints are suppressed for variables with unknown or Any types to reduce noise in IDE |
| Error messages | - Users can now use --info=<error-code> command line flag to set error severity to info for specific error codes. - Users can now filter summarized errors by specific error codes using pyrefly check --summarize-errors --only <error-code> |
🐛 bug fixes
We closed 15 bug issues this release 👏
- #1505 - fixed incorrect
bad-assignmenterror inside loop withdict.get - #1411 - Fixed
bad-argument-typefalse positive when a parameter type was inferred asNever - #1327 - Fixed issue where Hover did not show docstring for nested classes
- #1184 - Fixed a bug where
NewTypewas not treated as a type - #1301 - Fix for nested folder imports in the Pyrefly website sandbox
- #1173 - Fixed issue where VSCode extension import autocomplete included hidden directories
- And more: #1092, #747, #726, #1407, #1487, #1420, #1417, #1536, #1508, #1487, #1420, #1417
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.41.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
@aaron-ang , @alokpr, @AryanBagade, @asukaminato0721, @connernilsen, @yangdanny97, @dtolnay, @kv9898, @fangyi-zhou, @grievejia, @jvansch1, @kshitijgetsac, @maggiemoss, @arthaud, @ndmitchell, @rchen152, @rubmary, @stroxler, @VladimirMakaev, @migeed-z
Pyrefly v0.40.0
Status : ALPHA
Release date: 03 November 2025
Pyrefly v0.40.0 bundles 143 commits from 26 contributors.
✨ New & Improved
| Area | What’s new |
|---|---|
| Language Server | - Go-to definition / hover to overloads on operators like == - Fold on docstrings - New LSP configuration arguments added allowing users to enable/disable specific IDE features like Go-to-definition, Autocomplete, and Hover tooltips. See docs here for details. - Unreachable code will now be grayed out. - Fixed bug with symlinked paths in VSCode |
| Type Resolution | Implemented a TypeCache to significantly optimize is_subtype queries by caching resolved types. This leads to faster type checks and a more responsive IDE experience. |
| Error Reporting | Introduced a new FindError that will inform a user when there is a stub available for a package that they do not have installed. The default severity level for this will be a warning. |
| Django Integration | Continued work on Django support, including improved type inference for lazy enum labels |
| Jupyter Notebook support | Basic type checking support (pyrefly check path/to/file.ipynb) now available for jupyter notebooks. Still very experimental, further improvements coming soon |
🐛 bug fixes
We closed 15 bug issues this release 👏
- #1414 - Ensured
typing_extensions.dataclass_transformworks correctly. - #1351 - Correctly accept
TypedDictasPartialwhen unpacking oneTypedDictinto another and detect more open-unpacking errors. - #1257 - Addressed a crash related to
Var::ZEROduring autocomplete by usingdeep_forceto replace unsolved variables withUnknown. - #1104 - Resolved an issue where the VSCode extension did not highlight problems in files with symlinked paths under Linux
- #1045 - Addressed a false-positive in
raise..fromstatements by correctly handlingNonewhen it appears in a union - And more: #1412, #1409, #1405, #1396, #1356, #1294, #1288, #1234, #1145, #1119
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.40.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
@ndmitchell, @rchen152, @arthaud, @yangdanny97, @stroxler, @kinto0, @samwgoldman, @connernilsen, @grievejia, @tianhan0, , @rubmary, @nhawkes, @diliop, @migeed-z, @jvansch1, @vladima, @lolpack, @asukaminato0721, @dtolnay, @kv9898, @maggiemoss, @michaelcortese, Anqi Wu, Willy Lau
Pyrefly v0.39.0
Status : ALPHA
Release date: 27 October 2025
Pyrefly v0.39.0 bundles 195 commits from 19 contributors
✨ New & Improved
| Area | What’s new |
|---|---|
| Inheritance checks | - Added additional inheritance checks for typed dictionaries - Pyrefly no longer throws duplicate errors for overridden fields - Multiple inheritance checks are now skipped for some special fields, such as constructors |
| Language Server | - Major improvement on startup time for IDE features. This change makes most IDE features available instantly, with completions being available a few seconds later in large environments with hundreds of site-packages - Pyrefly can now update imports when files are renamed, by handling will_rename_file , a request sent by the language client when files are renamed. - Add semantic highlighting and hover docstrings in the Pyrefly website sandbox - Better IDE support for files that don’t have a marker file ( pyproject.toml / pyrefly.toml), making operations like find-references should now work in almost every case |
| Build Systems | Improved handling of namespaced directories in build systems. Pyrefly now keeps track of namespaces (directories with a python or source file, but no __init__) in the build system, then returns them for Pyrefly to work with |
| Docs & error messages | - Improved no-matching-overload errors. When no overload matches a function call, Pyrefly now displays the actual argument types that were provided. This eliminates the need to hover over each argument to understand why the call failed. - New error kind untyped-import added to detect missing Django stubs. This error is ignored by default; see the configuration docs for how to enable it. - Improved Pydantic documentation to explicitly list supported features. |
🐛 bug fixes
We closed 10 bug issues this release 👏
- #1364 -
__bool__check not working properly with unions - #1322 - autocomplete for
StrEnumimports not working properly - #1337 -
unbound-nameerrors erroneously thrown in try, except blocks - #1345 - IDE startup time very slow when
site-packagesdirectory contains a large number of additional packages - And more! #1374, #1359, #1320, #1302, #1257, #1217
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.39.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
@yangdanny97, @stroxler, @connernilsen, @kinto0, @migeed-z, @arthaud, @rchen152, @tianhan0, @samwgoldman, @lolpack, @Adist319, @asukaminato0721, @fangyi-zhou, @immanuel-peter, @jvansch1, @javabster, @pawelstrzmeta, @rubmary,