def run(input, conf, filepath=None):
if conf.is_file_ignored(filepath):<EOL><INDENT>return ()<EOL><DEDENT>if isinstance(input, (type(b'<STR_LIT>'), type(u'<STR_LIT>'))):  <EOL><INDENT>return _run(input, conf, filepath)<EOL><DEDENT>elif hasattr(input, '<STR_LIT>'):  <EOL><INDENT>content = input.read()<EOL>return _run(content, conf, filepath)<EOL><DEDENT>else:<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>
Lints a YAML source.

    Returns a generator of LintProblem objects.

    :param input: buffer, string or stream to read from
    :param conf: yamllint configuration object