joaotavora / eglot

A client for Language Server Protocol servers
GNU General Public License v3.0
2.25k stars 200 forks source link

Inconsistent error report for Python checkers #1352

Closed FabriceSalvaire closed 8 months ago

FabriceSalvaire commented 8 months ago

I was using lsp-mode... Tried eglot, but after hours of configuration tweaking... it is voodoo for me. When I open a python file, pylsp seems to only enable pyflakes and pycodestyle, and just reports few errors. Then I add a line 1/0 to force a fault. Now a lot of errors are suddenly reported and pylint is now enabled. I don't know if this is an eglot issue or due to the Python checker folks.

M-x eglot-show-workspace-configuration reports

{
  "pylsp": {
    "configurationSources": [
      "pycodestyle"
    ],
    "plugins": {
      "autopep8": {
        "enabled": false
      },
      "pylsp_black": {
        "enabled": true
      },
      "pyls_isort": {
        "enabled": true
      },
      "flake8": {
        "config": null,
        "enabled": false,
        "exclude": null,
        "executable": "flake8",
        "filename": null,
        "hangClosing": null,
        "ignore": null,
        "maxLineLength": null,
        "indentSize": null,
        "perFileIgnores": null,
        "select": null
      },
      "jedi": {
        "extra_paths": [],
        "env_vars": null,
        "environment": null
      },
      "jedi_completion": {
        "enabled": true,
        "include_params": true,
        "include_class_objects": true,
        "fuzzy": false,
        "eager": false,
        "resolve_at_most": 25,
        "cache_for": [
          "pandas",
          "numpy",
          "tensorflow",
          "matplotlib"
        ]
      },
      "jedi_definition": {
        "enabled": true,
        "follow_imports": true,
        "follow_builtin_imports": true
      },
      "jedi_hover": {
        "enabled": true
      },
      "jedi_references": {
        "enabled": true
      },
      "jedi_signature_help": {
        "enabled": true
      },
      "jedi_symbols": {
        "enabled": true,
        "all_scopes": true,
        "include_import_symbols": true
      },
      "mccabe": {
        "enabled": true,
        "threshold": 15
      },
      "preload": {
        "enabled": true,
        "modules": null
      },
      "pycodestyle": {
        "enabled": true,
        "exclude": null,
        "filename": null,
        "select": null,
        "ignore": null,
        "hangClosing": null,
        "maxLineLength": null,
        "indentSize": null
      },
      "pydocstyle": {
        "enabled": false,
        "convention": null,
        "addIgnore": null,
        "addSelect": null,
        "ignore": null,
        "select": null,
        "match": "(?!test_).*\\.py",
        "matchDir": "[^\\.].*"
      },
      "pyflakes": {
        "enabled": true
      },
      "pylint": {
        "enabled": true,
        "args": null,
        "executable": null
      },
      "rope_completion": {
        "enabled": true,
        "eager": false
      },
      "yapf": {
        "enabled": true
      }
    }
  }
}
joaotavora commented 8 months ago

Read text that appears in front of you when creating issues.