Return a comma-separated list of option strings & metavariables.
(self, option)
| 335 | self.help_width = max(self.width - self.help_position, 11) |
| 336 | |
| 337 | def format_option_strings(self, option): |
| 338 | """Return a comma-separated list of option strings & metavariables.""" |
| 339 | if option.takes_value(): |
| 340 | metavar = option.metavar or option.dest.upper() |
| 341 | short_opts = [self._short_opt_fmt % (sopt, metavar) |
| 342 | for sopt in option._short_opts] |
| 343 | long_opts = [self._long_opt_fmt % (lopt, metavar) |
| 344 | for lopt in option._long_opts] |
| 345 | else: |
| 346 | short_opts = option._short_opts |
| 347 | long_opts = option._long_opts |
| 348 | |
| 349 | if self.short_first: |
| 350 | opts = short_opts + long_opts |
| 351 | else: |
| 352 | opts = long_opts + short_opts |
| 353 | |
| 354 | return ", ".join(opts) |
| 355 | |
| 356 | class IndentedHelpFormatter (HelpFormatter): |
| 357 | """Format help with indented section bodies. |
no test coverage detected