| @@ 487-498 (lines=12) @@ | ||
| 484 | ) |
|
| 485 | ||
| 486 | ||
| 487 | def _set_update_parser_arg(_parser): |
|
| 488 | """ |
|
| 489 | config parser argument for updating |
|
| 490 | """ |
|
| 491 | ||
| 492 | _parser.add_argument("-f", "--file", help="source yaml file") |
|
| 493 | _parser.add_argument('-u', '--update', help="update with args, instance as \"a.b.c=d# d comment\"") |
|
| 494 | _parser.add_argument('-a', '--append', action="store_true", help="append to a seq") |
|
| 495 | ||
| 496 | group = _parser.add_mutually_exclusive_group() |
|
| 497 | group.add_argument("-o", "--out-file", help="indicate output yaml file") |
|
| 498 | group.add_argument("-i", "--inplace", action="store_true", help="indicate whether result store in origin file") |
|
| 499 | ||
| 500 | ||
| 501 | def _set_reset_parser(_parsers): |
|
| @@ 487-498 (lines=12) @@ | ||
| 484 | ) |
|
| 485 | ||
| 486 | ||
| 487 | def _set_update_parser_arg(_parser): |
|
| 488 | """ |
|
| 489 | config parser argument for updating |
|
| 490 | """ |
|
| 491 | ||
| 492 | _parser.add_argument("-f", "--file", help="source yaml file") |
|
| 493 | _parser.add_argument('-u', '--update', help="update with args, instance as \"a.b.c=d# d comment\"") |
|
| 494 | _parser.add_argument('-a', '--append', action="store_true", help="append to a seq") |
|
| 495 | ||
| 496 | group = _parser.add_mutually_exclusive_group() |
|
| 497 | group.add_argument("-o", "--out-file", help="indicate output yaml file") |
|
| 498 | group.add_argument("-i", "--inplace", action="store_true", help="indicate whether result store in origin file") |
|
| 499 | ||
| 500 | ||
| 501 | def _set_reset_parser(_parsers): |
|