perceval/backends/core/slack.py
def setup_cmd_parser(cls):
        """Returns the Slack argument parser."""

        parser = BackendCommandArgumentParser(cls.BACKEND.CATEGORIES,
                                              from_date=True,
                                              token_auth=True,
                                              archive=True)

        # Backend token is required
        action = parser.parser._option_string_actions['--api-token']
        action.required = True

        # Slack options
        group = parser.parser.add_argument_group('Slack arguments')
        group.add_argument('--max-items', dest='max_items',
                           type=int, default=MAX_ITEMS,
                           help="Maximum number of items requested on the same query")

        # Required arguments
        parser.parser.add_argument('channel',
                                   help="Slack channel identifier")

        return parser
def setup_cmd_parser(cls):
        parser = BackendCommandArgumentParser(cls.BACKEND.CATEGORIES,
                                              from_date=True,
                                              token_auth=True,
                                              archive=True)

        # Backend token is required
        action = parser.parser._option_string_actions['--api-token']
        action.required = True

        # Slack options
        group = parser.parser.add_argument_group('Slack arguments')
        group.add_argument('--max-items', dest='max_items',
                           type=int, default=MAX_ITEMS,
                           help="Maximum number of items requested on the same query")

        # Required arguments
        parser.parser.add_argument('channel',
                                   help="Slack channel identifier")

        return parser
def setup_cmd_parser ( cls ) : parser = BackendCommandArgumentParser ( cls . BACKEND . CATEGORIES , from_date = True , token_auth = True , archive = True ) # Backend token is required action = parser . parser . _option_string_actions [ '--api-token' ] action . required = True # Slack options group = parser . parser . add_argument_group ( 'Slack arguments' ) group . add_argument ( '--max-items' , dest = 'max_items' , type = int , default = MAX_ITEMS , help = "Maximum number of items requested on the same query" ) # Required arguments parser . parser . add_argument ( 'channel' , help = "Slack channel identifier" ) return parser
Returns the Slack argument parser.
Returns the Slack argument parser .