mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
If mypy fails it should report the error back to lintrunner (#145550)
This happened to me because I had a bad LD_LIBRARY_PATH and mypy was failing to run (.so load error) - but lintrunner was silent about the underlying problem. Differential Revision: [D68593081](https://our.internmc.facebook.com/intern/diff/D68593081) Pull Request resolved: https://github.com/pytorch/pytorch/pull/145550 Approved by: https://github.com/bobrenjc93, https://github.com/Skylion007
This commit is contained in:
parent
7c314bfed4
commit
1335882b2a
1 changed files with 15 additions and 0 deletions
|
|
@ -149,6 +149,21 @@ def check_files(
|
|||
]
|
||||
stdout = str(proc.stdout, "utf-8").strip()
|
||||
stderr = str(proc.stderr, "utf-8").strip()
|
||||
if proc.returncode not in (0, 1):
|
||||
return [
|
||||
LintMessage(
|
||||
path=None,
|
||||
line=None,
|
||||
char=None,
|
||||
code=code,
|
||||
severity=LintSeverity.ERROR,
|
||||
name="command-failed",
|
||||
original=None,
|
||||
replacement=None,
|
||||
description=stderr,
|
||||
)
|
||||
]
|
||||
|
||||
rc = [
|
||||
LintMessage(
|
||||
path=match["file"],
|
||||
|
|
|
|||
Loading…
Reference in a new issue