Skip to content

Mypy over Language Server Protocol and VS Code extension #12168

Open

Description

@karthiknadig

The Python team for VS Code has been working on putting various tools we support behind LSP and breaking them out into their own extensions This work is now far enough along that we wanted to share the extension prototypes for your tool with you and see if you had any interest in owning the extension or the Python-based LSP server backing it yourself?

If you don't want to take on that responsibility that's totally fine and understandable! If you want to leave the extension to us we would then publish the extension on the VS Code Marketplace ourselves. We also plan to publish the extension as open source and support the extension for as long as we felt it made sense to based on usage numbers. But due to the difficulty of migrating extension ownership, we wanted to ask early whether you wanted to own the extension from the start? If you did want to own the extension we would give you the code, help you publish to the VS Code Marketplace, and do anything else we can to help you be successful with this.

We have attached a zip file to this issue containing a prototype extension to give you an idea of what we are planning. You can download it, extract the .vsix file, and then install the VSIX to try it out python-mypy.zip. This prototype version was built with python 3.10 and bundles mypy v0.930 (as fallback if nothing is found in your environment).

To be very clear, there's no pressure or expectations from us. We just want to make sure you as a project had an opportunity to own this extension instead of us from the get-go before the extension gained traction.

Activity

  1. hauntsaninja commented on Feb 12, 2022

    @hauntsaninja
    Collaborator
  2. Zzzen commented on May 8, 2022

    @Zzzen

    Is python-mypy.zip open sourced? AFAIK, dmypy_server exposes only a few API, how do you implement the language server protocol?

  3. karthiknadig commented on May 9, 2022

    @karthiknadig
    Author

    @Zzzen the .vsix inside the zip is just another zip file you should be able to rename .vsix to zip and unpack it. There is a linter_server.py in this location that implements the entire language server:
    image

    It basically calls mypy.main, with arguments, as expected by mypy.

  4. brettcannon commented on May 9, 2022

    @brettcannon
    Member

    There is also another mypy extension from the community that we may point people at instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions