We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0746e55 commit 643a091Copy full SHA for 643a091
bpython/autocomplete.py
@@ -480,9 +480,11 @@ def matches(
480
r = self.locate(cursor_offset, line)
481
if r is None:
482
return None
483
- curDictParts = lineparts.current_dict(cursor_offset, line)
484
- assert curDictParts, "current_dict when .locate() truthy"
485
- _, _, dexpr = curDictParts
+ current_dict_parts = lineparts.current_dict(cursor_offset, line)
+ if current_dict_parts is None:
+ return None
486
+
487
+ _, _, dexpr = current_dict_parts
488
try:
489
obj = safe_eval(dexpr, locals_)
490
except EvaluationError:
0 commit comments