Get the bound command function for a command. :param command: the name of the command :return: the bound function implementing the command, or None if not found
(self, command: str)
| 3333 | self._redirecting = saved_redir_state.saved_redirecting |
| 3334 | |
| 3335 | def get_command_func(self, command: str) -> BoundCommandFunc | None: |
| 3336 | """Get the bound command function for a command. |
| 3337 | |
| 3338 | :param command: the name of the command |
| 3339 | :return: the bound function implementing the command, or None if not found |
| 3340 | """ |
| 3341 | command_func_name = constants.COMMAND_FUNC_PREFIX + command |
| 3342 | command_func = getattr(self, command_func_name, None) |
| 3343 | return cast(BoundCommandFunc, command_func) if callable(command_func) else None |
| 3344 | |
| 3345 | def _get_command_category(self, func: BoundCommandFunc) -> str: |
| 3346 | """Determine the category for a command. |
no outgoing calls