Skip to content

Commit ea6b2c5

Browse files
Fix completer suffix for mappings/sequences.
1 parent 2d4b0b0 commit ea6b2c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ptpython/completer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,9 +568,9 @@ def get_suffix(name: str) -> str:
568568
obj = getattr(result, name, None)
569569
if inspect.isfunction(obj) or inspect.ismethod(obj):
570570
return "()"
571-
if isinstance(obj, dict):
571+
if isinstance(obj, collections_abc.Mapping):
572572
return "{}"
573-
if isinstance(obj, (list, tuple)):
573+
if isinstance(obj, collections_abc.Sequence):
574574
return "[]"
575575
except:
576576
pass

0 commit comments

Comments
 (0)