Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-134215: PyREPL: Do not show underscored modules by default during autocompletion#134267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
fd0212d3e314e87c4f4c8ff6b6a3f7a2db92c5f81e14721485f97959a04ecdfca897545636adbdc1a4034a2872ae854d10e3fc8e0491834304f78cfff02e15262b4e10323ec3038fc4e76435a014cac01e1ac4351e8886499a3d6bFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -101,9 +101,14 @@ def _find_modules(self, path: str, prefix: str) -> list[str]: | ||
| if self._is_suggestion_match(module.name, prefix)] | ||
| def _is_suggestion_match(self, module_name: str, prefix: str) -> bool: | ||
| """ | ||
| Filter the modules returned by the autocompletion | ||
| The private modules (start with _) are only returned if explicitly specified | ||
| """ | ||
| if prefix: | ||
| return module_name.startswith(prefix) | ||
| return not module_name.startswith("_") | ||
kevteg marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| def iter_submodules(self, parent_modules: list[pkgutil.ModuleInfo]) -> Iterator[pkgutil.ModuleInfo]: | ||
| """Iterate over all submodules of the given parent modules.""" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1 @@ | ||
| autocompletion return the private modules (start with _) only if explicitly specified | ||
kevteg marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
Uh oh!
There was an error while loading.Please reload this page.