Last active
May 12, 2022 14:57
-
-
Save scharf/a8d505f15f3fe261362f6e5b5f5c7557 to your computer and use it in GitHub Desktop.
mypy wrapper to make the error links clickabe in pycharm/webstorm/intellij (jetbrains)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PY_ROOT=$(cd "$(dirname "$0")";cd ../..; pwd) | |
MYPY_BIN=${PY_ROOT}/.venv/bin/mypy | |
basepath=`pwd` | |
OUTPUT=`$MYPY_BIN $*` | |
echo | |
$MYPY_BIN $* | awk -v basepath=$basepath '{done=0} /.*:.*:.*/ {print basepath"/" $0; done=1} done==0 {print}' | |
exit ${PIPESTATUS[0]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment