(self, attrs)
| 601 | self._long_opts.append(opt) |
| 602 | |
| 603 | def _set_attrs(self, attrs): |
| 604 | for attr in self.ATTRS: |
| 605 | if attr in attrs: |
| 606 | setattr(self, attr, attrs[attr]) |
| 607 | del attrs[attr] |
| 608 | else: |
| 609 | if attr == 'default': |
| 610 | setattr(self, attr, NO_DEFAULT) |
| 611 | else: |
| 612 | setattr(self, attr, None) |
| 613 | if attrs: |
| 614 | attrs = sorted(attrs.keys()) |
| 615 | raise OptionError( |
| 616 | "invalid keyword arguments: %s" % ", ".join(attrs), |
| 617 | self) |
| 618 | |
| 619 | |
| 620 | # -- Constructor validation methods -------------------------------- |
no test coverage detected