使用参数运行jupyter nbextensions

时间:2018-10-17 02:37:41

标签: python jupyter-notebook autopep8

如何将options={'max_line_length': 120}传递给jupyter-autopep8

这是我要更新的json定义库。

{
    "python": {
        "library": "import json\nimport autopep8",
        "prefix": "print(json.dumps(autopep8.fix_code(u",
        "postfix": ")))"
    }
}

这样autopep8的称呼就像

import autopep8
autopep8.fix_code('some_input', options={'max_line_length': 120})

0 个答案:

没有答案