(self, text, line, begidx, endidx)
| 1239 | return self.completedefault(text, line, begidx, endidx) |
| 1240 | |
| 1241 | def completedefault(self, text, line, begidx, endidx): |
| 1242 | if text.startswith("$"): |
| 1243 | # Complete convenience variables |
| 1244 | conv_vars = self.curframe.f_globals.get('__pdb_convenience_variables', {}) |
| 1245 | return [f"${name}" for name in conv_vars if name.startswith(text[1:])] |
| 1246 | |
| 1247 | state = 0 |
| 1248 | matches = [] |
| 1249 | completer = self.rlcompleter(self.curframe.f_globals | self.curframe.f_locals) |
| 1250 | while (match := completer.complete(text, state)) is not None: |
| 1251 | matches.append(match) |
| 1252 | state += 1 |
| 1253 | return matches |
| 1254 | |
| 1255 | @contextmanager |
| 1256 | def _enable_rlcompleter(self, ns): |
no test coverage detected