Skip to content

Instantly share code, notes, and snippets.

@yxliang01
Created May 29, 2019 21:33
Show Gist options
  • Save yxliang01/b975fffa0b145d75ed1dba5b3a9ad960 to your computer and use it in GitHub Desktop.
Save yxliang01/b975fffa0b145d75ed1dba5b3a9ad960 to your computer and use it in GitHub Desktop.
A wrapper for correcting vscode-python extension invokes mypy incorrect problem.
#!/bin/bash
# Author: Xiao Liang <https://github.com/yxliang01>
# Should invoke this in the root package which is also supposed to be the VS Code workspace root
args=( "$@" )
args[-1]=${args[-1]#"$(pwd)/"}
# For debugging
# echo ${args[@]} > /tmp/mypy-test.log
.tox/dev/bin/python -m mypy ${args[@]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment