mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
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:
parent
f4c8462b97
commit
4b11854a2e
2 changed files with 13 additions and 18 deletions
|
@ -1,8 +1,7 @@
|
|||
[MASTER]
|
||||
persistent = no
|
||||
extension-pkg-whitelist=PyQt5,ankirspy
|
||||
ignore = aqt/forms
|
||||
init-hook='from PyQt5.QtWebChannel import QWebChannel; print("successful import!"); import sys; print(sys.path)'
|
||||
extension-pkg-whitelist=PyQt5
|
||||
ignore = forms
|
||||
|
||||
[TYPECHECK]
|
||||
ignored-modules=win32file,pywintypes,socket,win32pipe
|
||||
|
|
|
@ -1,25 +1,21 @@
|
|||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import PyQt5
|
||||
|
||||
import PyQt5.QtCore
|
||||
from pylint.lint import Run
|
||||
|
||||
if __name__ == "__main__":
|
||||
(module, ini) = sys.argv[1:]
|
||||
ini = os.path.abspath(ini)
|
||||
|
||||
sys.exit(
|
||||
subprocess.run(
|
||||
Run(
|
||||
[
|
||||
sys.executable,
|
||||
"-m",
|
||||
"pylint",
|
||||
"qt/aqt/qt.py",
|
||||
"qt/aqt",
|
||||
"--rcfile",
|
||||
ini,
|
||||
"--extension-pkg-whitelist=PyQt5",
|
||||
"-j",
|
||||
"0",
|
||||
"-v",
|
||||
],
|
||||
check=False,
|
||||
).returncode
|
||||
]
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue