FwPython, Part 1: Setting the Stage
Companion post to my PyCon 2026 Typing Summit talk, "From Soundness to Blame: AI-Assisted Formalization of a Tiny Python." This is the first in a series.
Define less, check more: Pyrefly now speaks attrs
Built-in support for attrs is available in Pyrefly as of version 1.2.0-dev.1, and ships in the upcoming 1.2.0 stable release. You get accurate constructor signatures and better type safety for your attrs classes, with no plugins or configuration to set up.
Pyrefly v1.1 is here!

Pyrefly v1.1 is now available 🎉 This is our first minor release since reaching stable v1.0 in May, and it brings improvements across the board: better performance, smarter type checking, and new IDE refactoring tools.
Talk: Tensor Shapes in the Type System
Why aren't tensor shapes part of the type system?
When you write a PyTorch model, the hardest part of composing tensor ops is keeping track of their shapes. The standard practice today is to write shapes down as comments as you go. This talk introduces an experimental Pyrefly feature that brings tensor shapes into Python's type system, so those shape annotations can become inferred type hints instead of comments.
The talk was originally presented at the PyCon US 2026 Typing Summit. The slides and edited transcript are provided below for your convenience.
Want to give it a spin? This feature is available in Pyrefly today, and we'd love to hear your feedback and suggestions.
Talk: Type Checking in Agentic Workflows
Does adding type checking to an agentic workflow really help agents?
We ran an experiment recently to determine whether there are improvements in the success rate for completing different kinds of tasks. In theory, having a type checker present should help the agent catch type errors earlier, validate fixes incrementally as it works, and reduce the need for slow, test-driven iterative feedback loops.
This talk was originally presented at the PyCon US 2026 Typing Conference. The slides and edited transcript are provided below for your convenience.
Are you really expected to run five type-checkers now?
Mypy, Pyrefly, Pyright, ty, Zuban, and possibly more that will come in the future... how are library maintainers expected to cope?
TL;DR: Prioritise running as many type-checkers as possible on your test suite. Run at least one on your source code.
Making Type Coverage Visible in Dify's CI
Dify is a large open-source platform for building LLM applications. Its backend is a Python Flask application with workflows, RAG pipelines, model providers, agents, Celery tasks, database migrations, and a large test suite. That makes it a useful case study for Pyrefly adoption: a real codebase where static analysis needs to fit into existing CI without blocking daily work.
The goal was not to make every Pyrefly diagnostic fail CI on day one. That would have been noisy and counterproductive. The better approach was to split the rollout into two CI surfaces: a blocking check for the files we were ready to enforce, and full-project reporting that stayed non-blocking and showed up in PR comments.
Pyrefly v1.0 is here!

Today we are pleased to share that Pyrefly, our open source type checker and language server for Python, has reached stable version 1 status, meaning we are confident that Pyrefly is ready for production use.
Right Types, Wrong Code: Surprising Bugs A Type Checker Catches
A type checker, as its name suggests, catches type mismatches: things like passing a str to a function that expects an int. But to understand your code's types, a type checker also has to understand its structure: control flow, scoping, class hierarchies, and more. This lets it detect a surprisingly wide range of issues that have nothing to do with int vs. str.
Here are five real categories of bugs that Pyrefly catches, none of which are straightforward type mismatches.