# HG changeset patch # User Pierre-Yves David # Date 2023-12-20 15:30:32 # Node ID 0bb5299800cafcedbea666e4c78f0e0b346321b0 # Parent f4a0806081f2e6fed91f6bf4ff4dee5dbfea8ef6 pytype: only output the "pytype crashed" message on error If pytype did not crash while generating stub, that message is kind of confusing. It seems simple enough to avoid it in this case. diff --git a/contrib/check-pytype.sh b/contrib/check-pytype.sh --- a/contrib/check-pytype.sh +++ b/contrib/check-pytype.sh @@ -127,5 +127,7 @@ pytype -V 3.7 --keep-going --jobs auto \ -x mercurial/wireprotov1peer.py \ -x mercurial/wireprotov1server.py -echo 'pytype crashed while generating the following type stubs:' -find .pytype/pyi -name '*.pyi' | xargs grep -l '# Caught error' | sort +if find .pytype/pyi -name '*.pyi' | xargs grep -ql '# Caught error'; then + echo 'pytype crashed while generating the following type stubs:' + find .pytype/pyi -name '*.pyi' | xargs grep -l '# Caught error' | sort +fi