How to use the ptr._generate_pylint_cmd function in ptr

To help you get started, we’ve selected a few ptr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github facebookincubator / ptr / ptr_tests.py View on Github external
def test_generate_pylint_command(self) -> None:
        pylint_exe = Path("/bin/pylint")
        with TemporaryDirectory() as td:
            module_dir = Path(td)
            subdir = module_dir / "awlib"
            cf = module_dir / ".pylint"
            py2 = subdir / "awesome2.py"
            py1 = module_dir / "awesome.py"
            touch_files(cf, py1, py2)

            conf = {"run_pylint": True}

            self.assertEqual(
                ptr._generate_pylint_cmd(module_dir, pylint_exe, conf),
                (str(pylint_exe), "--rcfile", str(cf), str(py1), str(py2)),
            )