Skip to content

Pycharm plugin for deep type inference based dict keys completion. As you may see from commit history, it was not updated for years since I don't use python myself, but I'm still open for small feature requests - if you file an issue, I'll likely implement it in a week or so...

License

Notifications You must be signed in to change notification settings

klesun/deep-dict-completion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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?).

About

Pycharm plugin for deep type inference based dict keys completion. As you may see from commit history, it was not updated for years since I don't use python myself, but I'm still open for small feature requests - if you file an issue, I'll likely implement it in a week or so...

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published