如何在 VS Code 中定义 pylance linting 参数(类似于 "python.linting.pylanceArgs")?
How to define pylance linting arguments in VS Code (something like "python.linting.pylanceArgs")?
直到大约 3 周前,我一直在使用 pylint 对 VS Code
中的 python
文件进行 linting。
然后,我启用 pylance
替换 pylint
。
然而,pylance
未在 VS Code
提供的 specific linter-list 中列出。
现在,pylance
不显示未使用的模块导入。我怀疑这不包含在 pylance
的默认 linting 参数中,所以我试图找出如何修改它们,类似于使用 pylint
进行修改的过程,例如记录在案的 here and implemented like so (插入到settings.json
-当前工作空间的文件中):
"python.linting.pylintArgs": [
"--max-line-length=80",
"--disable=W0142,W0403,W0613,W0232,R0903,R0913,C0103,R0914,C0304,F0401,W0402,E1101,W0614,C0111,C0301"
]
如何以类似的方式自定义 pylance
的 linting 规则?
直到大约 3 周前,我一直在使用 pylint 对 VS Code
中的 python
文件进行 linting。
然后,我启用 pylance
替换 pylint
。
然而,pylance
未在 VS Code
提供的 specific linter-list 中列出。
现在,pylance
不显示未使用的模块导入。我怀疑这不包含在 pylance
的默认 linting 参数中,所以我试图找出如何修改它们,类似于使用 pylint
进行修改的过程,例如记录在案的 here and implemented like so (插入到settings.json
-当前工作空间的文件中):
"python.linting.pylintArgs": [
"--max-line-length=80",
"--disable=W0142,W0403,W0613,W0232,R0903,R0913,C0103,R0914,C0304,F0401,W0402,E1101,W0614,C0111,C0301"
]
如何以类似的方式自定义 pylance
的 linting 规则?