在更新 VSCode 的 Python 插件后,PyLance 引起了麻烦。
def (f, *args):
if f:
f(*args)
...导致“标识符中的字符无效”
如何禁用这些警告?
也许我需要创建./.vscode/settings.json
:
{
"python.analysis.disabled": [
"I want something like:", "invalid-character-in-identifier" ],
}
...但在https://code.visualstudio.com/docs/python/settings-reference#_python-language-server-settings上找不到任何合适的东西
我可以从 VSCode 以某种方式推断出我需要的令牌吗?
PS 请不要批评 unicode 变量名的使用。这不是重点。变量名有效,从命令行运行。