def _run(self) -> Iterator[_Flake8Error]:
    mypy_cmdline = self.build_mypy_cmdline(self.filename, self.options.mypy_config)
    mypy_re = self.build_mypy_re(self.filename)
    last_t499 = 0
    try:
        (stdout, stderr, returncode) = mypy.api.run(mypy_cmdline)
    except Exception as exc:
        last_t499 += 1
        (yield self.adapt_error(T498(last_t499, 0, vars=(type(exc), str(exc)))))
        for line in traceback.format_exc().splitlines():
            last_t499 += 1
            (yield self.adapt_error(T499(last_t499, 0, vars=(line,))))
    else:
        for line in stdout.splitlines():
            try:
                e = self.make_error(line, mypy_re)
            except ValueError:
                last_t499 += 1
                (yield self.adapt_error(T499(last_t499, 0, vars=(line,))))
                continue
            if self.omit_error(e):
                continue
            (yield self.adapt_error(e))
        for line in stderr.splitlines():
            last_t499 += 1
            (yield self.adapt_error(T499(last_t499, 0, vars=(line,))))
def _run(self) -> Iterator[_Flake8Error]:
    mypy_cmdline = self.build_mypy_cmdline(self.filename, self.options.mypy_config)
    mypy_re = self.build_mypy_re(self.filename)
    last_t499 = 0
    try:
        (stdout, stderr, returncode) = mypy.api.run(mypy_cmdline)
    except Exception as exc:
        last_t499 += 1
        (yield self.adapt_error(T498(last_t499, 0, vars=(type(exc), str(exc)))))
        for line in traceback.format_exc().splitlines():
            last_t499 += 1
            (yield self.adapt_error(T499(last_t499, 0, vars=(line,))))
    else:
        for line in stdout.splitlines():
            try:
                e = self.make_error(line, mypy_re)
            except ValueError:
                last_t499 += 1
                (yield self.adapt_error(T499(last_t499, 0, vars=(line,))))
                continue
            if self.omit_error(e):
                continue
            (yield self.adapt_error(e))
        for line in stderr.splitlines():
            last_t499 += 1
            (yield self.adapt_error(T499(last_t499, 0, vars=(line,))))