0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

vscode python pylanceのmoduleに関する警告文を消す

Posted at

やりたいこと

vscodeのpythonファイルにおけるimport分に波線が下につくのを消したい。dockerや仮想環境を使う場合は目障りでしかないため

結論

setting.jsonに以下の分を追加する

"python.analysis.diagnosticSeverityOverrides": {
    "reportMissingModuleSource": false,
    "reportMissingImports": false,
}

説明

pylanceにあるpyrightの機能のひとつらしい
pylanceをinstallするとpyrightも自動でinstall

解決手法

波線にマウスをホバー → reportMissingModuleSoruceですよ
生成AIに"vscode pylance report MissingModuleSource disable"と尋ねる。完

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?