(self, opts)
| 580 | return opts |
| 581 | |
| 582 | def _set_opt_strings(self, opts): |
| 583 | for opt in opts: |
| 584 | if len(opt) < 2: |
| 585 | raise OptionError( |
| 586 | "invalid option string %r: " |
| 587 | "must be at least two characters long" % opt, self) |
| 588 | elif len(opt) == 2: |
| 589 | if not (opt[0] == "-" and opt[1] != "-"): |
| 590 | raise OptionError( |
| 591 | "invalid short option string %r: " |
| 592 | "must be of the form -x, (x any non-dash char)" % opt, |
| 593 | self) |
| 594 | self._short_opts.append(opt) |
| 595 | else: |
| 596 | if not (opt[0:2] == "--" and opt[2] != "-"): |
| 597 | raise OptionError( |
| 598 | "invalid long option string %r: " |
| 599 | "must start with --, followed by non-dash" % opt, |
| 600 | self) |
| 601 | self._long_opts.append(opt) |
| 602 | |
| 603 | def _set_attrs(self, attrs): |
| 604 | for attr in self.ATTRS: |
no test coverage detected