Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Run mypy in pre-commit, through a pyenv/virtualenv enabler wrapper script #30922
I believe this would fix the issues we're having and kind of poorly working around with mypy needing our venv active but it might not be, e.g. when committing from a GUI tool not launched from a venv-activated shell. Supports pyenv(-virtualenv) and venvs in a couple of typical dirs, falls back gracefullly if no venv found.
Related issue (if applicable): fixes #
Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>
Example entry for
@balloob would you happen to have time to check this out? I'm not aware of anything I've missed, and I think we could just try it out and see if folks run into any issues. The virtualenvs must be either managed by pyenv-virtualenv, or be located in venv/ or .venv/ but I think that's a reasonable assumption an could be extended.
In addition to getting more mypy coverage on dev systems, we'd avoid problems when people are forgetting to address the -all config when making pre-commit changes; we're already seeing that with some smaller changes, addition of codespell etc.