def _validate_format(self, args, format, inplace, recursive, **others):
        if not format:
            if inplace or recursive or len(args) < 2:
                return None
            format = os.path.splitext(args[1])[1][1:]
        format = format.upper()
        if format not in ['TXT', 'TSV', 'HTML']:
            raise DataError("Invalid format: '%s'." % format)
        return format
dataset/ETHPy150Open shellderp/sublime-robot-plugin/lib/robot/tidy.py/TidyCommandLine._validate_format/original