From d3e49913947e35478afe09ef7a93108d6a872bac Mon Sep 17 00:00:00 2001 From: Belousow Makc Date: Fri, 12 Apr 2019 23:41:00 +0300 Subject: [PATCH] Fix mypy==0.700 compatibility. mypy.api.run method should take List[str] of args. https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.parse_args https://github.com/python/mypy/blob/d40990f5b91b1f06918222d1041441b7ff63f79a/mypy/api.py#L71 --- pyls_mypy/plugin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyls_mypy/plugin.py b/pyls_mypy/plugin.py index 3c2722a..4db9ef3 100644 --- a/pyls_mypy/plugin.py +++ b/pyls_mypy/plugin.py @@ -43,15 +43,15 @@ def parse_line(line, document=None): def pyls_lint(config, document): live_mode = config.plugin_settings('pyls_mypy').get('live_mode', True) if live_mode: - args = ('--incremental', + args = ['--incremental', '--show-column-numbers', '--follow-imports', 'silent', - '--command', document.source) + '--command', document.source] else: - args = ('--incremental', + args = ['--incremental', '--show-column-numbers', '--follow-imports', 'silent', - document.path) + document.path] report, errors, _ = mypy_api.run(args)