ipython / ipython/ipython

Tab completion not working for class when it has property with typing.Literal annotated return value

Open
#14,412 7 comments 2 reactions 0 assignees View on GitHub
tab-completion
Dominant language
Python
Stars
16.8k
Forks
4.5k
Avg merge
1d 2h
Merged PRs (30d)
6

Description

Here is an example class:
```python
import typing
class A:
@property
def value(self) -> typing.Literal['a']:
return 'a'
def get(self) -> typing.Literal['a']:
return 'a'
a = A()
```
Now if I type `a.` in IPython console, nothing will show up. If I put the same code in Python console, the second Tab will display the two methods.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.