こちらの環境でも問題が再現しました。
txt
1Windows 10
2Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)]
3VSCode 1.21.1
4Python(拡張機能) 2018.2.1
推測ですが大規模モジュールの場合、Intellisense
の名前解決の実行時間がかかりすぎてタイムアウトになっているみたいです。
■問題が発生するモジュール
numpy
pandas
tensorflow
■対応策として以下のように変数を宣言する時に、:
で型ヒント情報を与えればIntellisenseが効きました。
Python
1 df: pd.DataFrame = pd.read_csv('data.csv')
こちらの環境のsettings.json
です、ご参考まで。
json
1{
2 "python.pythonPath": "C:\ProgramData\Anaconda3\python.exe",
3 "python.linting.enabled": true,
4 "python.autoComplete.addBrackets": true,
5 "python.autoComplete.extraPaths": [
6 "C:\ProgramData\Anaconda3\Lib\site-packages"
7 ],
8 "python.linting.pylintArgs": [
9 "--ignored-modules=numpy,pandas,matplotlib",
10 "--ignored-classes=numpy,pandas,matplotlib",
11 "--extension-pkg-whitelist=numpy,pandas,matplotlib"
12 ],
13 "files.autoSave": "afterDelay"
14}
■参考情報
PEP 526: 変数アノテーションの文法
Intellisense for site-packages doesn't work as intended #720
Editing Python in VS Code
Slow autocompletion/formatting
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/03/19 08:20
2018/03/19 08:24