Description
Feature or enhancement
Proposal:
Attribute autocomplete in the new REPL does not show underscored names unless specifically asked for:
>>> class Foo:
... _foo = 2
... foo = 3
...
>>> Foo.<tab>
Foo.foo Foo.mro()
Note that only Foo.foo
is offered. To also get Foo._foo
, we need to write Foo._<tab>
. We should do the same for the import autocomplete.
Currently it just shows all modules/submodules, including those starting with an underscore:
>>> from importlib import <tab>
_abc _bootstrap_external machinery readers simple
_bootstrap abc metadata resources util
Please don't pick up this issue, I'd like to reserve it for someone at the PyConUS sprints :)
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Activity
kevteg commentedon May 19, 2025
I'm taking a look! (I'm at pycon us sprints)
pythongh-134215: Improve ModuleCompleter module
gh-134215: PyREPL: Do not show underscored modules by default during …
pythongh-134215: PyREPL: Do not show underscored modules by default d…
[3.14] gh-134215: PyREPL: Do not show underscored modules by default …
tomasr8 commentedon May 20, 2025
Thanks @kevteg for tackling this!
pythongh-134215: PyREPL: Do not show underscored modules by default d…