Skip to main content

Pyrefly v1.1 is here!

· 7 min read

Pyrefly v1.1

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

· 14 min read

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.

📎 Slides (PDF)

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

· 8 min read

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.

📎 Slides (PDF)

Making Type Coverage Visible in Dify's CI

· 6 min read

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!

· 10 min read

Pyrefly v1.0

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

· 4 min read

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.