◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
12 changes: 9 additions & 3 deletions bpython/importcompletion.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@

# The cached list of all known modules
modules = set()
fully_loaded = False


Expand Down Expand Up @@ -190,9 +193,12 @@ def find_modules(path):
continue
else:
if is_package:
for subname in find_modules(pathname):
if subname != "__init__":
yield "%s.%s" % (name, subname)
yield name


Expand Down
92 changes: 92 additions & 0 deletions bpython/test/test_import_not_cyclical.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
Toggle all file notes Toggle all file annotations