Пример #1
0
 def reset_parsers(self, usage='', version=None):
     # configuration file parser
     self.cfgfile_parser = ConfigParser()
     # command line parser
     self.cmdline_parser = optparse.OptionParser(usage=usage, version=version)
     self.cmdline_parser.options_manager = self
     self._optik_option_attrs = set(self.cmdline_parser.option_class.ATTRS)
Пример #2
0
 def reset_parsers(self,
                   usage: Optional[str] = "",
                   version: Optional[Any] = None) -> None:
     # configuration file parser
     self.cfgfile_parser = cp.ConfigParser()
     # command line parser
     self.cmdline_parser = optik_ext.OptionParser(usage=usage,
                                                  version=version)
     # mypy: "OptionParser" has no attribute "options_manager"
     # dynamic attribute?
     self.cmdline_parser.options_manager = self  # type: ignore
     self._optik_option_attrs = set(self.cmdline_parser.option_class.ATTRS)