回答編集履歴
5
追記
test
CHANGED
@@ -16,7 +16,19 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
|
19
|
+
|
20
|
+
|
19
|
-
推測
|
21
|
+
推測ですが大規模モジュールの場合、`Intellisense`の名前解決の実行時間がかかりすぎてタイムアウトになっているみたいです。
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
■問題が発生するモジュール
|
26
|
+
|
27
|
+
numpy
|
28
|
+
|
29
|
+
pandas
|
30
|
+
|
31
|
+
tensorflow
|
20
32
|
|
21
33
|
|
22
34
|
|
@@ -73,3 +85,5 @@
|
|
73
85
|
[Intellisense for site-packages doesn't work as intended #720](https://github.com/Microsoft/vscode-python/issues/720)
|
74
86
|
|
75
87
|
[Editing Python in VS Code](https://code.visualstudio.com/docs/python/editing)
|
88
|
+
|
89
|
+
[Slow autocompletion/formatting](https://github.com/DonJayamanne/pythonVSCode/issues/581)
|
4
追記
test
CHANGED
@@ -20,17 +20,13 @@
|
|
20
20
|
|
21
21
|
|
22
22
|
|
23
|
-
■対応策として
|
23
|
+
■対応策として以下のように変数を宣言する時に、`:`で型ヒント情報を与えればIntellisenseが効きました。
|
24
24
|
|
25
25
|
```Python
|
26
26
|
|
27
|
-
df:pd.DataFrame = pd.read_csv('data.csv')
|
27
|
+
df: pd.DataFrame = pd.read_csv('data.csv')
|
28
28
|
|
29
29
|
```
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
変数名:クラス名で型ヒント情報を渡させば、Intellisenseが効きました。
|
34
30
|
|
35
31
|
|
36
32
|
|
@@ -72,6 +68,8 @@
|
|
72
68
|
|
73
69
|
■参考情報
|
74
70
|
|
75
|
-
[E
|
71
|
+
[PEP 526: 変数アノテーションの文法](https://docs.python.jp/3/whatsnew/3.6.html#whatsnew36-pep526)
|
76
72
|
|
77
73
|
[Intellisense for site-packages doesn't work as intended #720](https://github.com/Microsoft/vscode-python/issues/720)
|
74
|
+
|
75
|
+
[Editing Python in VS Code](https://code.visualstudio.com/docs/python/editing)
|
3
再現したので、追記
test
CHANGED
@@ -1,10 +1,70 @@
|
|
1
|
-
|
1
|
+
こちらの環境でも問題が再現しました。
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
```txt
|
6
|
+
|
7
|
+
Windows 10
|
8
|
+
|
9
|
+
Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)]
|
10
|
+
|
11
|
+
VSCode 1.21.1
|
12
|
+
|
13
|
+
Python(拡張機能) 2018.2.1
|
14
|
+
|
15
|
+
```
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
推測だと行数が大きいモジュールの場合、Intellisenseの解決に実行に時間がかかりすぎてタイムアウトになっているみたいです。
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
■対応策として
|
24
|
+
|
25
|
+
```Python
|
26
|
+
|
27
|
+
df:pd.DataFrame = pd.read_csv('data.csv')
|
28
|
+
|
29
|
+
```
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
変数名:クラス名で型ヒント情報を渡させば、Intellisenseが効きました。
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
こちらの環境の`settings.json`です、ご参考まで。
|
38
|
+
|
5
39
|
```json
|
6
40
|
|
41
|
+
{
|
42
|
+
|
7
|
-
"python.
|
43
|
+
"python.pythonPath": "C:\ProgramData\Anaconda3\python.exe",
|
44
|
+
|
45
|
+
"python.linting.enabled": true,
|
46
|
+
|
47
|
+
"python.autoComplete.addBrackets": true,
|
48
|
+
|
49
|
+
"python.autoComplete.extraPaths": [
|
50
|
+
|
51
|
+
"C:\ProgramData\Anaconda3\Lib\site-packages"
|
52
|
+
|
53
|
+
],
|
54
|
+
|
55
|
+
"python.linting.pylintArgs": [
|
56
|
+
|
57
|
+
"--ignored-modules=numpy,pandas,matplotlib",
|
58
|
+
|
59
|
+
"--ignored-classes=numpy,pandas,matplotlib",
|
60
|
+
|
61
|
+
"--extension-pkg-whitelist=numpy,pandas,matplotlib"
|
62
|
+
|
63
|
+
],
|
64
|
+
|
65
|
+
"files.autoSave": "afterDelay"
|
66
|
+
|
67
|
+
}
|
8
68
|
|
9
69
|
```
|
10
70
|
|
2
参考情報を追加
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
`preloadModules`に値を追加して`VSCode`を再起動して実行してみ
|
1
|
+
`preloadModules`に値を追加して`VSCode`を再起動して実行してみはどうでしょうか。
|
2
2
|
|
3
3
|
|
4
4
|
|
@@ -13,3 +13,5 @@
|
|
13
13
|
■参考情報
|
14
14
|
|
15
15
|
[Editing Python in VS Code](https://code.visualstudio.com/docs/python/editing)
|
16
|
+
|
17
|
+
[Intellisense for site-packages doesn't work as intended #720](https://github.com/Microsoft/vscode-python/issues/720)
|
1
コードタグを追加
test
CHANGED
@@ -1,8 +1,12 @@
|
|
1
|
-
preloadModulesに値を追加してVSCodeを再起動して実行してみるとどうなりますかー?
|
1
|
+
`preloadModules`に値を追加して`VSCode`を再起動して実行してみるとどうなりますかー?
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
```json
|
6
|
+
|
5
7
|
"python.autoComplete.preloadModules": ["numpy", "pandas", "matplotlib"],
|
8
|
+
|
9
|
+
```
|
6
10
|
|
7
11
|
|
8
12
|
|