mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Invoke mypy from within runfiles
tools/mypy-watch now prints .py paths relative to the workspace root, which makes it easy to click on them to jump to the relevant file/line in VS Code.
This commit is contained in:
parent
a495fbaa8d
commit
d1a43a2d42
1 changed files with 6 additions and 6 deletions
12
qt/dmypy.py
12
qt/dmypy.py
|
@ -29,16 +29,16 @@ if subprocess.run(
|
||||||
"run",
|
"run",
|
||||||
"--",
|
"--",
|
||||||
"--config-file",
|
"--config-file",
|
||||||
"qt/mypy.ini",
|
workspace / "qt/mypy.ini",
|
||||||
".bazel/bin/qt/dmypy.runfiles/ankidesktop/pylib/anki",
|
"pylib/anki",
|
||||||
".bazel/bin/qt/dmypy.runfiles/ankidesktop/qt/aqt",
|
"qt/aqt",
|
||||||
"--python-executable",
|
"--python-executable",
|
||||||
os.path.abspath("python/stubs/extendsitepkgs"),
|
"python/stubs/extendsitepkgs",
|
||||||
],
|
],
|
||||||
env={
|
env={
|
||||||
"MYPYPATH": ".bazel/bin/qt/dmypy.runfiles/pyqt6",
|
"MYPYPATH": "../pyqt6",
|
||||||
"EXTRA_SITE_PACKAGES": os.path.abspath(os.getenv("EXTRA_SITE_PACKAGES")),
|
"EXTRA_SITE_PACKAGES": os.path.abspath(os.getenv("EXTRA_SITE_PACKAGES")),
|
||||||
},
|
},
|
||||||
cwd=workspace,
|
cwd=workspace / ".bazel/bin/qt/dmypy.runfiles/ankidesktop",
|
||||||
).returncode:
|
).returncode:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
Loading…
Reference in a new issue