def _parse_inputs(self):
    'A number of the command line options expect precisely one or two files.\n        '
    nr_input_files = len(self.inputs.input_files)
    for n in self.input_spec.bool_or_const_traits:
        t = self.inputs.__getattribute__(n)
        if isdefined(t):
            if isinstance(t, bool):
                if (nr_input_files != 2):
                    raise ValueError(('Due to the %s option we expected 2 files but input_files is of length %d' % (n, nr_input_files)))
            elif isinstance(t, float):
                if (nr_input_files != 1):
                    raise ValueError(('Due to the %s option we expected 1 file but input_files is of length %d' % (n, nr_input_files)))
            else:
                raise ValueError(('Argument should be a bool or const, but got: %s' % t))
    for n in self.input_spec.single_volume_traits:
        t = self.inputs.__getattribute__(n)
        if isdefined(t):
            if (nr_input_files != 1):
                raise ValueError(('Due to the %s option we expected 1 file but input_files is of length %d' % (n, nr_input_files)))
    for n in self.input_spec.two_volume_traits:
        t = self.inputs.__getattribute__(n)
        if isdefined(t):
            if (nr_input_files != 2):
                raise ValueError(('Due to the %s option we expected 2 files but input_files is of length %d' % (n, nr_input_files)))
    for n in self.input_spec.n_volume_traits:
        t = self.inputs.__getattribute__(n)
        if isdefined(t):
            if (not (nr_input_files >= 1)):
                raise ValueError(('Due to the %s option we expected at least one file but input_files is of length %d' % (n, nr_input_files)))
    return super(Math, self)._parse_inputs()
A number of the command line options expect precisely one or two files.
def _parse_inputs(self):
    '\n        '
    nr_input_files = len(self.inputs.input_files)
    for n in self.input_spec.bool_or_const_traits:
        t = self.inputs.__getattribute__(n)
        if isdefined(t):
            if isinstance(t, bool):
                if (nr_input_files != 2):
                    raise ValueError(('Due to the %s option we expected 2 files but input_files is of length %d' % (n, nr_input_files)))
            elif isinstance(t, float):
                if (nr_input_files != 1):
                    raise ValueError(('Due to the %s option we expected 1 file but input_files is of length %d' % (n, nr_input_files)))
            else:
                raise ValueError(('Argument should be a bool or const, but got: %s' % t))
    for n in self.input_spec.single_volume_traits:
        t = self.inputs.__getattribute__(n)
        if isdefined(t):
            if (nr_input_files != 1):
                raise ValueError(('Due to the %s option we expected 1 file but input_files is of length %d' % (n, nr_input_files)))
    for n in self.input_spec.two_volume_traits:
        t = self.inputs.__getattribute__(n)
        if isdefined(t):
            if (nr_input_files != 2):
                raise ValueError(('Due to the %s option we expected 2 files but input_files is of length %d' % (n, nr_input_files)))
    for n in self.input_spec.n_volume_traits:
        t = self.inputs.__getattribute__(n)
        if isdefined(t):
            if (not (nr_input_files >= 1)):
                raise ValueError(('Due to the %s option we expected at least one file but input_files is of length %d' % (n, nr_input_files)))
    return super(Math, self)._parse_inputs()