4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

VSCodeでPylanceのreportPrivateImportUsageを無視する

Posted at

Pylanceのtype-checkingモードはとても便利なのですが、意図しないreportPrivateImportUsageの警告を出してきます。たとえば、

from dask import array as da

da.from_array(...)  # <- 警告!

とかです。この場合dask__all__を定義していないためです。

解決策

ファイルのどこかに

# pyright: reportPrivateImportUsage=false

を書けばOK。

4
2
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
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?