Skip to content

Instantly share code, notes, and snippets.

@dogukancagatay
Last active March 15, 2024 13:47
Show Gist options
  • Save dogukancagatay/99df8636b0ca9d5a59f40b50f4a70970 to your computer and use it in GitHub Desktop.
Save dogukancagatay/99df8636b0ca9d5a59f40b50f4a70970 to your computer and use it in GitHub Desktop.
Install compiled version of Mypy #python #mypy
#!/usr/bin/env bash
# Check whether your mypy version compiled: `mypy --version`
# Mypy works a lot faster when using the compiled version
## Usage:
## curl -fL 'https://gist.githubusercontent.com/dogukancagatay/99df8636b0ca9d5a59f40b50f4a70970/raw/mypy_compiled.sh' | bash
MYPY_VERSION="${1:-1.9.0}"
curl -fL -o /tmp/${MYPY_VERSION}.tar.gz "https://github.com/python/mypy/archive/refs/tags/${MYPY_VERSION}.tar.gz"
tar -xzf /tmp/${MYPY_VERSION}.tar.gz -C /tmp
cd /tmp/mypy-*${MYPY_VERSION}
MYPY_USE_MYPYC=1 pip install .
python3 -m mypy --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment