Giter Club home page Giter Club logo

Comments (17)

haplo avatar haplo commented on July 17, 2024

@tomv564 I created a PR to fix this, if you could review, merge and release a python-lsp-server-compatible version of pyls-mypy that would be much appreciated.

from pyls-mypy.

haplo avatar haplo commented on July 17, 2024

@andfoy There is a maintained fork at https://github.com/Richardk2n/mypy-ls.

@Richardk2n Would you accept #52 to make the project work against https://github.com/python-lsp/python-lsp-server? I can open the PR against your repository.

from pyls-mypy.

haplo avatar haplo commented on July 17, 2024

@andfoy I have reviewed mypy-ls and it looks like a minimalistic fork to improve plugin configuration support, but it hasn't had activity since October. It also has issues disabled, which is a red flag for me.

I think best course of action would be to create another fork at python-lsp/pylsp-mypy and release as a new pylsp-mypy package to PyPI. python-lsp-server can then point to this new repository and package as the maintained version of the plugin. If you add me as a maintainer I can handle the necessary changes.

from pyls-mypy.

asford avatar asford commented on July 17, 2024

@haplo I'm happy to contribute to that fork.

I would recommend starting from the https://github.com/Richardk2n/mypy-ls fork, as the configuration support is dramatically improved and bring the plugin inline with command-line mypy invocations.
My personal fork provides support for dmypy as well as mypy as well as some misc bugfixes for non-live-mode checking.
If you'd like to @ me in an issue to provide dmypy support in the fork I can open a PR there.

from pyls-mypy.

andfoy avatar andfoy commented on July 17, 2024

If you are willing to maintain the new fork, then I'll move it to the organization later today

from pyls-mypy.

haplo avatar haplo commented on July 17, 2024

@haplo I'm happy to contribute to that fork.

I would recommend starting from the https://github.com/Richardk2n/mypy-ls fork, as the configuration support is dramatically improved and bring the plugin inline with command-line mypy invocations.
My personal fork provides support for dmypy as well as mypy as well as some misc bugfixes for non-live-mode checking.
If you'd like to @ me in an issue to provide dmypy support in the fork I can open a PR there.

All that sounds good to me, I will bring @Richardk2n improvements for plugin configurability, and will be happy to see your improvements too. Let's get the fork released with python-lsp-server compatibility and then we will keep improving it. Hopefully the community will stop getting fragmented and everybody can contribute to a single upstream project.

BTW I just switched to non-live-mode myself and it's working much better, so I'm looking forward to your bugfixes in that regard. :)

If you are willing to maintain the new fork, then I'll move it to the organization later today

You can sign me up for it, I'm an active user of mypy and the LSP plugin.

from pyls-mypy.

Richardk2n avatar Richardk2n commented on July 17, 2024

@haplo I enabled issues. I did not intend for them to be disabled. I'll happily include any suggestions and would love to see this plugin getting some attention.

from pyls-mypy.

haplo avatar haplo commented on July 17, 2024

@haplo I enabled issues. I did not intend for them to be disabled. I'll happily include any suggestions and would love to see this plugin getting some attention.

Great to hear from you @Richardk2n.

I have no interest in creating yet another fork of the plugin if you are available as a maintainer. If you could merge python-lsp#2 and release a new python-lsp-server-compatible version we can ask @andfoy to point to your fork as the recommended mypy plugin.

Please be aware that @andfoy mentioned that python-lsp-server might integrate a mypy plugin in the future, but until then we need to maintain the third-party plugin.

from pyls-mypy.

GaetanLepage avatar GaetanLepage commented on July 17, 2024

What is the current state of the mypy integration to python-lsp-server ?
Is the plan still to create a fork within the python-lsp organization ?

from pyls-mypy.

Richardk2n avatar Richardk2n commented on July 17, 2024

What is the current state of the mypy integration to python-lsp-server ?
Is the plan still to create a fork within the python-lsp organization ?

Currently my fork mypy-ls is working with python-lsp-server (as far as i know). And given, that I keep maintaining it there is no plan to fork it on the organization until they decide to integrate mypy support directly into python-lsp-server (as far as i know).

from pyls-mypy.

GaetanLepage avatar GaetanLepage commented on July 17, 2024

Great ! I just installed it thanks to pip install mypy-ls.
How is it configurable though ?
When I was using palantir's python-language-server, I was configuring the mypy plugin in this way: https://github.com/tomv564/pyls-mypy#configuration.

Now that I am using python-lsp-server, am I still able to configure it through the language server config ?
As editor, I am using neovim.

from pyls-mypy.

Richardk2n avatar Richardk2n commented on July 17, 2024

It should be configurable as before. However as I never really figured out where the config should be placed (I would be grateful If you could tell me, where and how python-language-server expects its configs) there is a possibility, that I might ignore those passed to the language server. You can try. If it doesn't work place a file with your config formatted as in here in your working directory or a parent of said directory.

I would be grateful for feedback about what works, and how people are using the plugin, as my testing does not cover all use cases.

from pyls-mypy.

GaetanLepage avatar GaetanLepage commented on July 17, 2024

Hello !
Sorry for having waited before answering.
Actually, this fork of the mypy plugin works fine for me with the following configuration section in the language client:

pylsp_mypy = {
    enabled = true,
    live_mode = false
},

from pyls-mypy.

haplo avatar haplo commented on July 17, 2024

Actually, this fork of the mypy plugin works fine for me with the following configuration section in the language client:

Does it work when you uninstall python-language-server and install only python-lsp-server? I would be surprised because the imports in the plugin code are different, I would expect either errors or the plugin not being registered at all.

from pyls-mypy.

GaetanLepage avatar GaetanLepage commented on July 17, 2024

It seems that I only have python-lsp-server available right now.

[I] ➜ pip show python-language-server
WARNING: Package(s) not found: python-language-server

~ 
[I] ➜ pip show python-lsp-server     
Name: python-lsp-server
Version: 1.1.0.dev0
Summary: Python Language Server for the Language Server Protocol
Home-page: https://github.com/python-lsp/python-lsp-server
Author: Python Language Server Contributors
Author-email: None
License: UNKNOWN
Location: /home/gaetan/.local/lib/python3.9/site-packages
Requires: jedi, python-lsp-jsonrpc, pluggy, ujson, setuptools
Required-by: mypy-ls

And it works. However, I don't know teh exact way both mypy-ls and python-lsp-server interact.

from pyls-mypy.

haplo avatar haplo commented on July 17, 2024

@GaetanLepage OK, that is expected, mypy-ls (now renamed to pylsp-mypy) works with python-lsp-server. pyls-mypy on the other hand works with python-language-server, which as the original message in this issue points out, is not maintained anymore. I thought your original comment regarded pyls-mypy, hence my confusion.

from pyls-mypy.

GaetanLepage avatar GaetanLepage commented on July 17, 2024

Thank you for this useful clarification !

from pyls-mypy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.