Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Catch exceptions
  • Loading branch information
tomasr8 committed Apr 19, 2025
commit fd81999df165f15a901cccef6e6b0ca35b4b2324
7 changes: 6 additions & 1 deletion Lib/_pyrepl/_module_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ def get_completions(self, line: str) -> list[str]:
result = ImportParser(line).parse()
if not result:
return []
return self.complete(*result)
try:
return self.complete(*result)
except Exception:
# Some unexpected error occurred, make it look like
# no completions are available
return []

def complete(self, from_name: str | None, name: str | None) -> list[str]:
if from_name is None:
Expand Down
Loading