Return whether a given method's parser is in self. If the parser does not yet exist, it will be created if applicable. This is basically for checking if a method is argarse-based.
(self, command_method: BoundCommandFunc)
| 255 | return "" |
| 256 | |
| 257 | def __contains__(self, command_method: BoundCommandFunc) -> bool: |
| 258 | """Return whether a given method's parser is in self. |
| 259 | |
| 260 | If the parser does not yet exist, it will be created if applicable. |
| 261 | This is basically for checking if a method is argarse-based. |
| 262 | """ |
| 263 | parser = self.get(command_method) |
| 264 | return bool(parser) |
| 265 | |
| 266 | def get(self, command_method: BoundCommandFunc) -> Cmd2ArgumentParser | None: |
| 267 | """Return a given method's parser or None if the method is not argparse-based. |