noamraph / dreampie

DreamPie - The Python shell you've always dreamed about!
www.dreampie.org
GNU General Public License v3.0
235 stars 53 forks source link

autocompletion of unimported modules and files #80

Closed amayevsky closed 2 years ago

amayevsky commented 2 years ago

This is to improve autocompletion because currently there are cases where "from module.submodule" is able to autocomplete "submodule", but "from module import submodule" can't.

There are also cases where the autocomplete options for modules get overwritten if the __init__ at the level of that module has imports and has been executed. This behavior is updated to provide autocomplete options from the union of the submodules and __init__ contents.

amayevsky commented 2 years ago
noamraph commented 2 years ago

@amayevsky I don't really like parsing entire files just for autocomplete. Maybe revert the last commits that do it?

amayevsky commented 2 years ago

@noamraph I updated it so that the file parsing functionality is behind a setting which is off by default. That way the capability is still there and can maybe be added to the preferences screen later.