MCPcopy Index your code
hub / github.com/RustPython/RustPython / handle_command_def

Method handle_command_def

Lib/pdb.py:435–461  ·  view source on GitHub ↗

Handles one command line during command list definition.

(self, line)

Source from the content-addressed store, hash-verified

433 return self.handle_command_def(line)
434
435 def handle_command_def(self, line):
436 """Handles one command line during command list definition."""
437 cmd, arg, line = self.parseline(line)
438 if not cmd:
439 return
440 if cmd == 'silent':
441 self.commands_silent[self.commands_bnum] = True
442 return # continue to handle other cmd def in the cmd list
443 elif cmd == 'end':
444 self.cmdqueue = []
445 return 1 # end of cmd list
446 cmdlist = self.commands[self.commands_bnum]
447 if arg:
448 cmdlist.append(cmd+' '+arg)
449 else:
450 cmdlist.append(cmd)
451 # Determine if we must stop
452 try:
453 func = getattr(self, 'do_' + cmd)
454 except AttributeError:
455 func = self.default
456 # one of the resuming commands
457 if func.__name__ in self.commands_resuming:
458 self.commands_doprompt[self.commands_bnum] = False
459 self.cmdqueue = []
460 return 1
461 return
462
463 # interface abstraction functions
464

Callers 1

onecmdMethod · 0.95

Calls 3

getattrFunction · 0.85
parselineMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected