◐ Shell
reader mode source ↗
Skip to content
Draft
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
33 changes: 33 additions & 0 deletions bpython/importcompletion.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def __init__(
skiplist if skiplist is not None else tuple()
)
self.fully_loaded = False

if paths is None:
self.modules.update(sys.builtin_module_names)
Expand Down @@ -220,6 +221,8 @@ def find_modules(
continue
if (stat.st_dev, stat.st_ino) not in self.paths:
self.paths.add((stat.st_dev, stat.st_ino))
for subname in self.find_modules(path_real):
if subname is None:
yield None # take a break to avoid unresponsiveness
Expand Down Expand Up @@ -250,3 +253,33 @@ def find_coroutine(self) -> Optional[bool]:
self.fully_loaded = True

return True
Toggle all file notes Toggle all file annotations