'Determines if the provided directory is a directory that could contain
Mako template files that need to be linted.
Arguments:
directory: The directory to be linted.
Returns:
True if this directory should be linted for Mako template violations
and False otherwise.'

def _is_valid_directory(self, directory):

    if is_skip_dir(SKIP_DIRS, directory):
        return False
    if (('/templates/' in directory) or directory.endswith('/templates')):
        return True
    return False
