muffinmad / anakin-language-server

Yet another Jedi Python language server
GNU General Public License v3.0
37 stars 3 forks source link

A few keys in CompletionItem violate the protocol #7

Closed rwols closed 3 years ago

rwols commented 4 years ago

Some keys in the returned completion items have a null value. For example:

{
    "label": "__bool__",
    "deprecated": false,
    "documentation": "self != 0",
    "command": null,
    "textEdit": {
        "newText": "__bool__",
        "range": {
            "end": {
                "character": 18,
                "line": 237
            },
            "start": {
                "character": 18,
                "line": 237
            }
        }
    },
    "preselect": false,
    "detail": null,
    "data": null,
    "commitCharacters": null,
    "kind": 18,
    "sortText": "zz__bool__",
    "insertTextFormat": null,
    "additionalTextEdits": null,
    "filterText": null,
    "insertText": null
}

This isn't allowed by the spec. Either the key exists and the value is valid, or the key doesn't exist.

muffinmad commented 4 years ago

Created https://github.com/openlawlibrary/pygls/issues/124

muffinmad commented 3 years ago

Looks like it is fixed upstream. Closing now.