Write all the options into the formatter if they exist.
(self, ctx, formatter)
| 247 | """Customized command for Celery.""" |
| 248 | |
| 249 | def format_options(self, ctx, formatter): |
| 250 | """Write all the options into the formatter if they exist.""" |
| 251 | opts = OrderedDict() |
| 252 | for param in self.get_params(ctx): |
| 253 | rv = param.get_help_record(ctx) |
| 254 | if rv is not None: |
| 255 | if hasattr(param, 'help_group') and param.help_group: |
| 256 | opts.setdefault(str(param.help_group), []).append(rv) |
| 257 | else: |
| 258 | opts.setdefault('Options', []).append(rv) |
| 259 | |
| 260 | for name, opts_group in opts.items(): |
| 261 | with formatter.section(name): |
| 262 | formatter.write_dl(opts_group) |
| 263 | |
| 264 | |
| 265 | class DaemonOption(CeleryOption): |
nothing calls this directly
no test coverage detected