Planet Python
Follow
Python Engineering at Microsoft: Pylance + Pyrefly: bring your preferred type checker to Visual Studio Code
Microsoft is enhancing the Python developer experience by introducing the Type Server Protocol (TSP). This open standard, an extension of the Language Server Protocol, allows editors and tools to integrate type checkers as backend components. TSP decouples Pylance, the VS Code IDE intelligence layer, from its default type checker, Pyright. This separation enables developers to easily switch to alternative type checkers like Meta's Pyrefly. Pylance's core features, including completions and GitHub Copilot integration, remain consistent regardless of the chosen type checker. Microsoft has partnered with Meta to ensure Pyrefly's full TSP support, leveraging Meta's expertise in static type analysis and AI/ML libraries. This collaboration aims to foster interoperability within the Python ecosystem. Pyrefly, known for its high performance and CI compatibility, can now be seamlessly integrated with Pylance. This offers developers Pyrefly's type analysis engine combined with Pylance's AI-aware intelligence. Users can try this new experience by installing Pylance version 2026.4.1 or newer. Pylance automatically detects Pyrefly installations and prompts users to switch. Alternatively, users can manually select their preferred diagnostics source, including Pylance, Pylance + Pyright, or Pylance + Pyrefly, through VS Code settings. The status bar will then clearly indicate the active diagnostics source.