Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 1.17 KB

README.md

File metadata and controls

22 lines (16 loc) · 1.17 KB

Jetbrains repository: https://plugins.jetbrains.com/plugin/10247-deep-dict-completion

Build: may be outdated

screenshot

Idea is similar to https://github.com/klesun/deep-assoc-completion

What it already does:

  • Makes it provide completion in vars assigned from function call like here:
def get_book():
    return {'author': 'Vova', 'genre': 'Science Fiction', 'title': 'Sand-Hill'}

book = get_book()
book[''] # should suggest: 'author', 'genre', 'title'

What i plan to do:

  • Add Go To definition.
  • Make it possible to specify keys comments. I guess it could be done using something like mypy's TypedDict('Movie', {'name': str, 'year': int}) syntax. Though it requires lotta of redundant text, so maybe the old good @param movie = {'name': 'Blade Runner', 'year': 1982} would be better. Maybe support both.
  • Add some more support based on mypy typing if idea does not have them by default. It seems to understand namedtuple and inference arrays of objects very well, but what about generics?).