pylint/config.py
def optik_option(self, provider, opt, optdict):
        """get our personal option definition and return a suitable form for
        use with optik/optparse
        """
        optdict = copy.copy(optdict)
        if "action" in optdict:
            self._nocallback_options[provider] = opt
        else:
            optdict["action"] = "callback"
            optdict["callback"] = self.cb_set_provider_option
        # default is handled here and *must not* be given to optik if you
        # want the whole machinery to work
        if "default" in optdict:
            if (
                "help" in optdict
                and optdict.get("default") is not None
                and optdict["action"] not in ("store_true", "store_false")
            ):
                optdict["help"] += " [current: %default]"
            del optdict["default"]
        args = ["--" + str(opt)]
        if "short" in optdict:
            self._short_options[optdict["short"]] = opt
            args.append("-" + optdict["short"])
            del optdict["short"]
        # cleanup option definition dict before giving it to optik
        for key in list(optdict.keys()):
            if key not in self._optik_option_attrs:
                optdict.pop(key)
        return args, optdict
def optik_option(self, provider, opt, optdict):
        """get our personal option definition and return a suitable form for
        use with optik/optparse
        """
        optdict = copy.copy(optdict)
        if "action" in optdict:
            self._nocallback_options[provider] = opt
        else:
            optdict["action"] = "callback"
            optdict["callback"] = self.cb_set_provider_option
        # default is handled here and *must not* be given to optik if you
        # want the whole machinery to work
        if "default" in optdict:
            if (
                "help" in optdict
                and optdict.get("default") is not None
                and optdict["action"] not in ("store_true", "store_false")
            ):
                optdict["help"] += " [current: %default]"
            del optdict["default"]
        args = ["--" + str(opt)]
        if "short" in optdict:
            self._short_options[optdict["short"]] = opt
            args.append("-" + optdict["short"])
            del optdict["short"]
        # cleanup option definition dict before giving it to optik
        for key in list(optdict.keys()):
            if key not in self._optik_option_attrs:
                optdict.pop(key)
        return args, optdict
def optik_option ( self , provider , opt , optdict ) : optdict = copy . copy ( optdict ) if "action" in optdict : self . _nocallback_options [ provider ] = opt else : optdict [ "action" ] = "callback" optdict [ "callback" ] = self . cb_set_provider_option # default is handled here and *must not* be given to optik if you # want the whole machinery to work if "default" in optdict : if ( "help" in optdict and optdict . get ( "default" ) is not None and optdict [ "action" ] not in ( "store_true" , "store_false" ) ) : optdict [ "help" ] += " [current: %default]" del optdict [ "default" ] args = [ "--" + str ( opt ) ] if "short" in optdict : self . _short_options [ optdict [ "short" ] ] = opt args . append ( "-" + optdict [ "short" ] ) del optdict [ "short" ] # cleanup option definition dict before giving it to optik for key in list ( optdict . keys ( ) ) : if key not in self . _optik_option_attrs : optdict . pop ( key ) return args , optdict
get our personal option definition and return a suitable form for
        use with optik/optparse
get our personal option definition and return a suitable form for use with optik / optparse