Skip to content

Commit 1e88864

Browse files
ambvtomasr8
andauthored
Update Lib/_pyrepl/_module_completer.py
Co-authored-by: Tomas R. <[email protected]>
1 parent e1ac435 commit 1e88864

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/_pyrepl/_module_completer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ def _find_modules(self, path: str, prefix: str) -> list[str]:
105105
def is_suggestion_match(self, module_name: str, prefix: str) -> bool:
106106
if prefix:
107107
return module_name.startswith(prefix)
108-
# Return False if no prefix and the module is private
109-
# So that the default behavior is only returning public modules
108+
# For consistency with attribute completion, which
109+
# does not suggest private attributes unless requested.
110110
return not module_name.startswith("_")
111111

112112
def iter_submodules(self, parent_modules: list[pkgutil.ModuleInfo]) -> Iterator[pkgutil.ModuleInfo]:

0 commit comments

Comments
 (0)