• Stars
    star
    110
  • Rank 316,770 (Top 7 %)
  • Language
    Python
  • License
    MIT License
  • Created over 7 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Mypy plugin for the Python Language Server

Mypy plugin for PYLS

https://travis-ci.org/tomv564/pyls-mypy.svg?branch=master

This is a plugin for the Palantir's Python Language Server (https://github.com/palantir/python-language-server)

It, like mypy, requires Python 3.2 or newer.

Installation

Install into the same virtualenv as pyls itself.

pip install pyls-mypy

Configuration

live_mode (default is True) provides type checking as you type.

As mypy is unaware of what file path is being checked, there are limitations with live_mode
  • Imports cannot be followed correctly
  • Stub files are not validated correctly

Turning off live_mode means you must save your changes for mypy diagnostics to update correctly.

Depending on your editor, the configuration should be roughly like this:

"pyls":
{
    "plugins":
    {
        "pyls_mypy":
        {
            "enabled": true,
            "live_mode": false
        }
    }
}