Feature Request : Autocomplete and docstring working when instantiating using class directly
- 主要言語
- Python
- スター
- 16.8k
- フォーク
- 4.5k
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 6
説明
Refer to the reproducer and gif below.
```
class Foo:
def __init__(self):
self.name = "My name"
def get_name(self):
'''
This is a sample doctring
'''
print(self.name)
```

As shown, both autocomplete and docstring features are working when we instantiate an object first. However, they stop working correctly when we instantiate using class directly.
Some further points :-
- In tab-completion, the intention is not to execute code so it makes sense that `Foo().` doesn't work. But in doing `Foo().get_name??`, we are executing that cell, and hence, expecting the resulting docstring.
- Alternatively, is it possible to statically determine what `Foo()` returns? In that case, we can use that result to fix both issues.
- The autocomplete issue does fix itself when `%config IPCompleter.use_jedi` is set to `True`
コントリビューションガイド
評価
この issue はまだ評価されていません。