有一个简单但令人困惑的问题:当我尝试在模块中使用我用诗歌添加的包时,它无法导入。采取的步骤:
poetry add sendgridimport sendgridImport "sendgrid" could not be resolved PylancereportMissingImports我尝试过的故障排除:
'C:\\Users\\xyz123\\AppData\\Local\\pypoetry\\Cache\\virtualenvs\\nameofproject-py3.10\\lib\\site-packages'poetry install给了我回应No dependencies to install or update到底是怎么回事?
我的函数在类中定义,将一个对象作为参数。对象后面有一个等号,仍然在函数参数定义中。我以前没有遇到过,这是什么意思?如果没有传递电子邮件密钥/对象对,它是否默认传递一个空对象?
class UserAPI extends DataSource {
async createUser({ email: emailArg } = {}) {
...function goes here... ^^^^
}
}
Run Code Online (Sandbox Code Playgroud)