Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manage pre-commit with Poetry in GitHub Actions
https://github.com/pre-commit/mirrors-mypy/issues/3#issuecomment-547999959 pre-commit/pre-commit#880 (comment) pre-commit runs mypy from an isolated virtualenv, so it requires a duplicate list of Python requirements. Furthermore, these requirements are installed by pip, which reduces compatibility with Poetry. Editable installs require a setup.py, which is not present in Poetry projects. The following error is seen: ```text ❯ pip install -e . ERROR: File "setup.py" not found. Directory cannot be installed in editable mode (A "pyproject.toml" file was found, but editable mode currently requires a setup.py based build.) ``` There is no ideal solution to this problem. The simplest is to add `language: system`, which means "you have to rely on whatever state the user's machine is in" (https://github.com/pre-commit/mirrors-mypy/issues/3#issuecomment-547999959). That's fine, and just requires an update to the GitHub Actions workflow to install the Poetry project, as I do before running pytest.
- Loading branch information