fix pylint in qt

pylint fails to read Qt modules when invoked as a subprocess with
-j 0, and it looks like I committed this in the middle of debugging
the issue. Work around it by invoking pylint directly. It's still
awfully slow, taking 30 seconds on a 10 core machine.
This commit is contained in:
Damien Elmes 2021-01-07 15:47:25 +10:00
parent f4c8462b97
commit 4b11854a2e
2 changed files with 13 additions and 18 deletions

View file

@ -1,8 +1,7 @@
[MASTER] [MASTER]
persistent = no persistent = no
extension-pkg-whitelist=PyQt5,ankirspy extension-pkg-whitelist=PyQt5
ignore = aqt/forms ignore = forms
init-hook='from PyQt5.QtWebChannel import QWebChannel; print("successful import!"); import sys; print(sys.path)'
[TYPECHECK] [TYPECHECK]
ignored-modules=win32file,pywintypes,socket,win32pipe ignored-modules=win32file,pywintypes,socket,win32pipe

View file

@ -1,25 +1,21 @@
import os import os
import subprocess import subprocess
import sys import sys
import PyQt5
import PyQt5.QtCore from pylint.lint import Run
if __name__ == "__main__": if __name__ == "__main__":
(module, ini) = sys.argv[1:] (module, ini) = sys.argv[1:]
ini = os.path.abspath(ini) ini = os.path.abspath(ini)
sys.exit( Run(
subprocess.run(
[ [
sys.executable, "qt/aqt",
"-m",
"pylint",
"qt/aqt/qt.py",
"--rcfile", "--rcfile",
ini, ini,
"--extension-pkg-whitelist=PyQt5", "-j",
"0",
"-v", "-v",
], ]
check=False,
).returncode
) )