mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
bpo-44752: refactor part of rlcompleter.Completer.attr_matches (GH-27433) (GH-27447)
(cherry picked from commit 6741794dd4
)
Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
This commit is contained in:
parent
ebba286709
commit
f8e13e35d1
1 changed files with 3 additions and 6 deletions
|
@ -186,13 +186,10 @@ class Completer:
|
||||||
# property method, which is not desirable.
|
# property method, which is not desirable.
|
||||||
matches.append(match)
|
matches.append(match)
|
||||||
continue
|
continue
|
||||||
try:
|
if (value := getattr(thisobject, word, None)) is not None:
|
||||||
val = getattr(thisobject, word)
|
matches.append(self._callable_postfix(value, match))
|
||||||
except Exception:
|
|
||||||
pass # Include even if attribute not set
|
|
||||||
else:
|
else:
|
||||||
match = self._callable_postfix(val, match)
|
matches.append(match)
|
||||||
matches.append(match)
|
|
||||||
if matches or not noprefix:
|
if matches or not noprefix:
|
||||||
break
|
break
|
||||||
if noprefix == '_':
|
if noprefix == '_':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue