(self, args, example, n)
Helper to make sure the command got the right number of arguments
Helper to make sure the command got the right number of arguments
Helper to make sure the command got the right number of arguments
def _get_n_args(self, args, example, n):
        """Helper to make sure the command got the right number of arguments
        """
        if len(args) != n:
            msg = (
                'Got unexpected number of arguments, expected {}. '
                '(example: "{} config {}")'
            ).format(n, get_prog(), example)
            raise PipError(msg)

        if n == 1:
            return args[0]
        else:
            return args
def _get_n_args ( self , args , example , n ) : if len ( args ) != n : msg = ( 'Got unexpected number of arguments, expected {}. ' '(example: "{} config {}")' ) . format ( n , get_prog ( ) , example ) raise PipError ( msg ) if n == 1 : return args [ 0 ] else : return args