【问题标题】:Mypy build task fails in vscodevscode中的Mypy构建任务失败
【发布时间】:2019-01-08 19:53:49
【问题描述】:

我在 vscode 中创建了一个任务,但是运行时出错。

构建任务task.json

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [{
        "label": "mypy",
        "type": "shell",
        "command": "mypy",
        "args": [
            "($file)"
        ],
        "group": {
            "kind": "build",
            "isDefault": true
        }
    }]
}

我收到的错误是

> Executing task: mypy ($file) <

/bin/bash: -c: line 0: syntax error near unexpected token `$file'
/bin/bash: -c: line 0: `mypy ($file)'
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.

【问题讨论】:

    标签: visual-studio-code mypy


    【解决方案1】:

    尝试${file} 获取当前打开的文件详细信息。

    参考:https://code.visualstudio.com/docs/editor/variables-reference

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-06-22
      • 1970-01-01
      • 2022-12-13
      • 2019-10-14
      • 1970-01-01
      • 2016-03-02
      • 2020-11-23
      • 1970-01-01
      相关资源
      最近更新 更多