anki/pylib/tests/run_pylint.py

31 lines
691 B
Python
Raw Normal View History

2021-04-13 10:45:05 +02:00
# Copyright: Ankitects Pty Ltd and contributors
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import os
import subprocess
import sys
if __name__ == "__main__":
(module, ini) = sys.argv[1:]
ini = os.path.abspath(ini)
folder = os.path.join(os.path.dirname(__file__), "..")
os.chdir(folder)
sys.exit(
subprocess.run(
2021-10-02 15:13:24 +02:00
[
sys.executable,
"-m",
"pylint",
module,
"-j",
"0",
"--rcfile",
ini,
"--persistent=no",
],
check=False,
).returncode
)