def run_mypy(self, paths=(), code=None):
        """Run MyPy with arguments."""
        if self.mypy:
            set_mypy_path(stub_dir)
            from coconut.command.mypy import mypy_run
            args = list(paths) + self.mypy_args
            if code is not None:
                args += ["-c", code]
            for line, is_err in mypy_run(args):
                if code is None or line not in self.mypy_errs:
                    printerr(line)
                if line not in self.mypy_errs:
                    self.mypy_errs.append(line)
                self.register_error(errmsg="MyPy error")
Run MyPy with arguments.