def is_skip_dir(skip_dirs, directory):
 for skip_dir in skip_dirs:
  skip_dir_regex = re.compile('(.*/)*{}(/.*)*'.format(re.escape(skip_dir)))
  if (skip_dir_regex.match(directory) is not None):
   return True
 return False

def is_skip_dir ( skip_dirs , directory ) : for skip_dir in skip_dirs : skip_dir_regex = re . compile ( '(.*/)*{}(/.*)*' . format ( re . escape ( skip_dir ) ) ) if ( skip_dir_regex . match ( directory ) is not None ) : return True return False
determines whether a directory should be skipped or linted .