Skip to content

No errors returned from pydocstyle #312

@andrewminer

Description

@andrewminer

I've been using pyls (v0.16.0) by way of the w0rp/ALE (27c5f) plugin for Vim (v8.0 for MacOS) for some time now without any problems, but starting recently I'm not getting any errors from pydocstyle, even when I clearly have errors in my input file. I've already been chatting with W0rp about it (dense-analysis/ale#1407), and it doesn't look like there's anything wrong on that end of things.

To demonstrate the problem, I've created a very simple file with multiple kinds of problems:

class Foo(object):

    def __init__(self):
        self.bar = f"bar{baz}"

And captured a log file of ALE's interactions with pyls while editing that file:

{"method":"textDocument/didChange","jsonrpc":"2.0","params":{"contentChanges":[{"text":"class Foo(object):\n\n    def __init__(self):\n        self.bar = f\"bar{baz}\"\n"}],"textDocument":{"uri":"file:///src/boom-mkboom/src/mkboom/sample.py","version":203}}}'
391.111639 SEND on 0: 'Content-Length: 130

{"method":"textDocument/didSave","jsonrpc":"2.0","params":{"textDocument":{"uri":"file:///src/boom-mkboom/src/mkboom/sample.py"}}}'
391.162486 : Starting job: sh  -c  git status --porcelain -- '/src/boom-mkboom/src/mkboom/sample.py'
391.162511 on 208: Created channel
391.179518 RECV on 208: '?? src/mkboom/sample.py
'
391.179734 on 208: channel_select_check(): Read EOF from ch_part[1], closing
391.191071 on 208: Job ended
391.191106 : Starting job: sh  -c  git status --porcelain -- '/src/boom-mkboom/src/mkboom/sample.py'
391.191136 on 209: Created channel
391.198092 : looking for messages on channels
391.198132 on 208: Closing channel because all readable fds are closed
391.198144 on 208: Closing channel
391.198152 on 208: Invoking callbacks and flushing buffers before closing
391.198225 on 208: Invoking channel callback <SNR>120_on_stdout
391.198317 on 208: Invoking close callback <SNR>120_on_exit_untracked
391.205380 RECV on 209: '?? src/mkboom/sample.py
'
391.205385 : looking for messages on channels
391.205399 on 209: Invoking channel callback <SNR>120_on_stdout
391.205595 on 209: channel_select_check(): Read EOF from ch_part[1], closing
391.205607 : looking for messages on channels
391.205612 on 209: Closing channel because all readable fds are closed
391.205616 on 209: Closing channel
391.205622 on 209: Invoking callbacks and flushing buffers before closing
391.205627 on 209: Invoking close callback <SNR>120_on_exit_untracked
391.205685 on 209: Job ended
391.205691 on 209: Freeing job
391.615236 RECV on 0: 'Content-Length: 308
Content-Type: application/vscode-jsonrpc; charset=utf8

{"method": "textDocument/publishDiagnostics", "params": {"uri": "file:///src/boom-mkboom/src/mkboom/sample.py", "diagnostics": [{"source": "pyflakes", "range": {"start": {"line": 3, "character": 25}, "end": {"line": 3, "character": 31}}, "message": "undefined name 'baz'", "severity": 2}]}, "jsonrpc": "2.0"}'
391.615242 : looking for messages on channels
391.615269 on 209: Closing channel
391.615276 on 209: Clearing channel
391.615288 on 209: Freeing channel
391.615295 on 0: Invoking channel callback <SNR>115_VimOutputCallback
395.199800 : looking for messages on channels
399.212494 on 208: Freeing job
399.212523 on 208: Closing channel
399.212529 on 208: Clearing channel
399.212535 on 208: Freeing channel
399.219156 : looking for messages on channels

Clearly, the important bit is:

{"method": "textDocument/publishDiagnostics", "params": {"uri": "file:///src/boom-mkboom/src/mkboom/sample.py", "diagnostics": [{"source": "pyflakes", "range": {"start": {"line": 3, "character": 25}, "end": {"line": 3, "character": 31}}, "message": "undefined name 'baz'", "severity": 2}]}, "jsonrpc": "2.0"}'

However, I only see the messages from pyflakes, and none from pydocstyle, like I'd expect (and as I used to). There don't seem to be any problems or exceptions... just no messages from pydocstyle. Can you help me diagnose what might be going on here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions