def _single_dir_pylint()

in eng/scripts/run_pylint.py [0:0]


def _single_dir_pylint(mod):
    inner_class = next(d for d in mod.iterdir() if d.is_dir() and not str(d).endswith("egg-info"))
    try:
        check_call(
            [
                sys.executable,
                "-m",
                "pylint",
                "--rcfile={}".format(get_rfc_file_location()),
                "--evaluation=(max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention + info)/ statement) * 10)))",
                "--load-plugins=pylint_guidelines_checker",
                "--output-format=parseable",
                "--recursive=y",
                "--py-version=3.9",
                str(inner_class.absolute()),
            ]
        )
        return True
    except CalledProcessError as e:
        logging.error("{} exited with linting error {}".format(str(inner_class.absolute()), e.returncode))
        return False