Pass through python used for type check to the test code from before the env is sanitized

This commit is contained in:
Kovid Goyal
2022-09-25 14:36:12 +05:30
parent 98eacb2067
commit 5ea0519f62
2 changed files with 4 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ def type_check() -> NoReturn:
generate_stub()
from kittens.tui.operations_stub import generate_stub # type: ignore
generate_stub()
py = shutil.which('python') or shutil.which('python3')
py = os.environ.get('PYTHON_FOR_TYPE_CHECK') or shutil.which('python') or shutil.which('python3')
os.execlp(py, py, '-m', 'mypy', '--pretty')