如何在VSCode上突出显示类型错误?
例如:
def f(x): return x**2 f(x=10) f(x=10, y=10)
第二个函数调用,使用两个参数,x和y。是否有任何扩展或设置来突出显示第二个函数调用中的类型错误?
发布于 2020-12-17 07:25:45
settings.json
"python.languageServer": "Pylance",
更新:
1).When在same文件中以不同的函数调用它:
same
2).When在different文件中以不同的函数调用它:请使用类似from b import f
different
from b import f
此外,请确保在当前选定的Python环境中成功安装了“Pylint”。(pip install pylint)
pip install pylint
https://stackoverflow.com/questions/65331749
相似问题