rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | import argparse |
| 2 | |
| 3 | def selftest_reverse(args, config, basepath, workspace): |
| 4 | """Reverse the value passed to verify the plugin is executing.""" |
| 5 | print(args.value[::-1]) |
| 6 | |
| 7 | def register_commands(subparsers, context): |
| 8 | parser_build = subparsers.add_parser('selftest-reverse', help='Reverse value (for selftest)', |
| 9 | formatter_class=argparse.ArgumentDefaultsHelpFormatter) |
| 10 | parser_build.add_argument('value', help='Value to reverse') |
| 11 | parser_build.set_defaults(func=selftest_reverse) |