(opt_group)
| 120 | |
| 121 | |
| 122 | def _read_group(opt_group): |
| 123 | all_options = list(opt_group._opts.values()) |
| 124 | |
| 125 | if opt_group.name == "auth": |
| 126 | print(COMMON_AUTH_OPTIONS_COMMENT) |
| 127 | print("") |
| 128 | common_options = [ |
| 129 | option |
| 130 | for option in all_options |
| 131 | if option["opt"].name in AUTH_OPTIONS["common"] |
| 132 | ] |
| 133 | _print_options(opt_group=opt_group, options=common_options) |
| 134 | |
| 135 | print("") |
| 136 | print(STANDALONE_AUTH_OPTIONS_COMMENT) |
| 137 | print("") |
| 138 | standalone_options = [ |
| 139 | option |
| 140 | for option in all_options |
| 141 | if option["opt"].name in AUTH_OPTIONS["standalone"] |
| 142 | ] |
| 143 | _print_options(opt_group=opt_group, options=standalone_options) |
| 144 | |
| 145 | if len(common_options) + len(standalone_options) != len(all_options): |
| 146 | msg = "Not all options are declared in AUTH_OPTIONS dict, please update it" |
| 147 | raise Exception(msg) |
| 148 | else: |
| 149 | options = all_options |
| 150 | _print_options(opt_group=opt_group, options=options) |
| 151 | |
| 152 | |
| 153 | def _read_groups(opt_groups): |
no test coverage detected