コード例 #1
0
ファイル: option_manager_mixin.py プロジェクト: nelfin/pylint
 def reset_parsers(self, usage=""):
     # configuration file parser
     self.cfgfile_parser = configparser.ConfigParser(
         inline_comment_prefixes=("#", ";"))
     # command line parser
     self.cmdline_parser = OptionParser(Option, usage=usage)
     self.cmdline_parser.options_manager = self
     self._optik_option_attrs = set(self.cmdline_parser.option_class.ATTRS)
コード例 #2
0
ファイル: arguments_manager.py プロジェクト: AWhetter/pylint
 def reset_parsers(self, usage: str = "") -> None:
     """DEPRECATED."""
     warnings.warn(
         "reset_parsers has been deprecated. Parsers should be instantiated "
         "once during initialization and do not need to be reset.",
         DeprecationWarning,
     )
     # configuration file parser
     self.cfgfile_parser = configparser.ConfigParser(
         inline_comment_prefixes=("#", ";")
     )
     # command line parser
     self.cmdline_parser = OptionParser(Option, usage=usage)
     self.cmdline_parser.options_manager = self  # type: ignore[attr-defined]
     self._optik_option_attrs = set(self.cmdline_parser.option_class.ATTRS)