如何解决 visual studio 代码中的 "Key/value pairs are not allowed within a set Pylance" 错误?

How do I solve "Key/value pairs are not allowed within a set Pylance" error in visual studio code?

我正在学习本教程Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial

我创建“SimpleStorage.sol”是为了稳固和部署,我正在编写“deploy.py”(时间戳 3:42:30s)。这是 deploy.py 的代码:

from solcx import compile_standard

with open("./SimpleStorage.sol", "r") as file:
    simple_storage_file = file.read()
    print(simple_storage_file)

#Compile our solidity

compiled_sol = compile_standard(
    {
        "language: Solidity",
        "sources": {"SimpleStorage.sol": {"content": simple_storage_file}},
        "settings": {
            "outputSelection": {
                "*" : {
                    "*" : ["abi", "metadata", "evm.bytecode", "evm.sourceMap"]
                }
            }
        },
    },
    
    solc_version = "0.6.0",
)

print(compiled_sol)

每当我尝试在 compile_standard 函数中设置参数时,我都会遇到“Key/value 对在 setPylance 中不允许”的问题。

如何解决这个问题?

找到“语言:Solidity”这一行。 请将此更改为 “语言”:“坚固”。 Python 将其识别为集合,而不是字典。