# Function to activate virtualenv if present
auto_activate_virtualenv() {
if [ -f "bin/activate" ]; then
source bin/activate
fi
}
# Add the function to chpwd hooks
add-zsh-hook chpwd auto_activate_virtualenv
How to indicate that a single file module is typed to mypy
You can’t. Repackage your module as the only module in a package.
mypy needs a py.typed in the package’s directory and if you have a single module at the top level of your repo there’s no way to get setuptools to package that in such a way that the wheel will contain the py.typed in a useful place.
Example of the changes needed: github.com/wheerd/multiset/pull/127/files
