microsoft / python-language-server

Microsoft Language Server for Python
Apache License 2.0
912 stars 131 forks source link

Duplicate code warnings #2161

Closed floli closed 3 years ago

floli commented 3 years ago

Hello,

using python-language-server together with Emacs lsp-mode, I get duplicate warnings for e.g. unused imports. The workspace log shows:

    {
      "severity": 2,
      "message": "'xxx.RecordingTopics' imported but unused",
      "code": "F401",
      "range": {
        "end": {
          "character": 4,
          "line": 23
        },
        "start": {
          "character": 0,
          "line": 23
        }
      },
      "source": "flake8"
    },

as well as

{
      "severity": 2,
      "message": "F401 'xxx.RecordingTopics' imported but unused",
      "range": {
        "end": {
          "character": 62,
          "line": 23
        },
        "start": {
          "character": 0,
          "line": 23
        }
      },
      "code": "F401",
      "source": "flake8"
    },

Versions are:

$ python3 --version
Python 3.6.9

$ pylsp --version
pylsp v1.2.1

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:        18.04
Codename:       bionic    

Thanks!

floli commented 3 years ago

Closed, I realized I use the other python language server.