skillfed

pylsp-mypy

Mypy linter for the Python LSP Server

pylsp-mypy v0.8.0 321.8K downloads/30d#7,620 on PyPI158
Permissive license MIT Active released

What it is and what it does

pylsp-mypy is a plugin that bridges mypy, Python's static type checker, into the Python LSP Server so that type errors appear in your editor in real time. Instead of running mypy separately from the command line, you get inline diagnostics as you type—or on save, depending on configuration. It reads mypy configuration from pyproject.toml and supports both standard mypy and the faster dmypy daemon mode for repeated checks.

The plugin is designed for developers who want to catch type errors early without leaving their IDE. It offers granular control over strictness, file exclusions, and performance trade-offs (live checking versus save-on-check). Configuration is straightforward via pyproject.toml, though advanced users can also pass custom mypy or dmypy commands—though doing so requires explicitly setting an environment variable for security.

Use it for:

  • Enable type checking hints in your editor while writing Python code, catching type mismatches before runtime.
  • Use dmypy daemon mode to speed up repeated type checks on large projects during active development.
  • Exclude test directories or generated code from type checking via regex patterns in pyproject.toml.
  • Display inferred types on hover to understand what mypy sees, useful when debugging type inference.
  • Integrate strict type checking into your IDE workflow without running mypy as a separate build step.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Integrates mypy static type checking into the Python LSP Server, displaying type errors and inferred types directly in your IDE as you edit.

Yes. This is a well-maintained, low-friction plugin that solves a real problem: bringing mypy diagnostics into your editor. It has no known vulnerabilities, permissive licensing, and active development. Install it if you use python-lsp-server and want inline type checking; the only gotcha is the Python 3.10+ requirement and the need to install it in the same virtualenv as the LSP server itself.

Install

pylsp-mypy on PyPI

pip

pip install pylsp-mypy

uv

uv add pylsp-mypy

poetry

poetry add pylsp-mypy

Installing pylsp-mypy

Before you install

Low friction install with active maintenance. Released 28 days ago, last commit 2025-08-27, and supports current Python versions (3.10–3.14). Depends on python-lsp-server and mypy, both standard tools.

License in practice

MIT license is permissive; you can use this freely in commercial and private projects with minimal restrictions.

Quickstart

pip install pylsp-mypy

# Add to pyproject.toml:
[tool.pylsp-mypy]
enabled = true
live_mode = true
strict = false

Requires Python 3.10 or newer and must be installed into the same virtualenv as python-lsp-server itself.

Verify before relying

  • Whether dmypy daemon mode actually improves responsiveness in practice for typical project sizes.
  • Performance impact of live_mode on large codebases or slow machines.
  • Compatibility with all LSP clients (hover display requires dmypy support).

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 3 — python-lsp-server, mypy, tomli
Maintenance actively maintained — 28 days since the last release
Last repo commit
First released
Downloads 321,754/month — #7,620 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pylsp_mypy-0.8.0-py3-none-any.whl

Keywords: mypy, typing

Development Status :: 4 - BetaIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development

Tags

mypy lsp pluginstatic type checking in editorpython lsp server mypyinline type checkingmypy ide integration
type-checkinglsp-pluginmypy-integration

More Software Development packages