问题一:vscode 语法检查
(1)在编程环境中添加第三包的智能提示,通过下面代码获得当前环境下的第三包的路径
from distutils.sysconfig import get_python_lib
print(get_python_lib())
(2)在settings.json中添加第三方包以及Python包的路径:
"python.autoComplete.extraPaths": [
"/home/cheng/miniconda3/envs/pytorch2/lib/python3.6/site-packages",
"/home/cheng/miniconda3/envs/pytorch2/lib/python3.6",
]
问题二:vscode autopep8格式化是每行有最长字符限制
"python.formatting.provider": "autopep8", # check python formatting tool
"python.formatting.autopep8Args": [ # set the length longer
"--max-line-length=200"
]
网友评论