def METHOD_NAME():
    py_files, c_files, rst_files, new_rm_mv = git_commit_files()
    # Check file content.
    for path in py_files:
        if os.path.realpath(path) == THIS_SCRIPT:
            continue
        with open_text(path) as f:
            lines = f.readlines()
        for lineno, line in enumerate(lines, 1):
            # space at end of line
            if line.endswith(' '):
                print("%s:%s %r" % (path, lineno, line))
                return sys.exit("space at end of line")
            line = line.rstrip()
            # # pdb (now provided by flake8-debugger plugin)
            # if "pdb.set_trace" in line:
            #     print("%s:%s %s" % (path, lineno, line))
            #     return sys.exit("you forgot a pdb in your python code")
            # # bare except clause (now provided by flake8-blind-except plugin)
            # if "except:" in line and not line.endswith("# NOQA"):
            #     print("%s:%s %s" % (path, lineno, line))
            #     return sys.exit("bare except clause")
    # Python linters
    if py_files:
        # flake8
        assert os.path.exists('.flake8')
        print("running flake8 (%s files)" % len(py_files))
        cmd = [PYTHON, "-m", "flake8", "--config=.flake8"] + py_files
        ret = subprocess.call(cmd)
        if ret != 0:
            return sys.exit("python code didn't pass 'flake8' style check; "
                            "try running 'make fix-flake8'")
        # isort
        print("running isort (%s files)" % len(py_files))
        cmd = [PYTHON, "-m", "isort", "--check-only"] + py_files
        ret = subprocess.call(cmd)
        if ret != 0:
            return sys.exit("python code didn't pass 'isort' style check; "
                            "try running 'make fix-imports'")
    # C linter
    if c_files:
        print("running clinter (%s files)" % len(c_files))
        # XXX: we should escape spaces and possibly other amenities here
        cmd = [PYTHON, "scripts/internal/clinter.py"] + c_files
        ret = subprocess.call(cmd)
        if ret != 0:
            return sys.exit("C code didn't pass style check")
    # RST linter
    if rst_files:
        print("running rst linter (%s)" % len(rst_files))
        cmd = ["rstcheck", "--config=pyproject.toml"] + rst_files
        ret = subprocess.call(cmd)
        if ret != 0:
            return sys.exit("RST code didn't pass style check")
    if new_rm_mv:
        out = sh([PYTHON, "scripts/internal/generate_manifest.py"])
        with open_text('MANIFEST.in') as f:
            if out.strip() != f.read().strip():
                sys.exit("some files were added, deleted or renamed; "
                         "run 'make generate-manifest' and commit again")