Skip to content

when run from gitlab CI, mypy does not use virtual environment #61

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
dpinol opened this issue May 12, 2025 · 1 comment
Open

when run from gitlab CI, mypy does not use virtual environment #61

dpinol opened this issue May 12, 2025 · 1 comment

Comments

@dpinol
Copy link

dpinol commented May 12, 2025

Hi,
replacing pre-commit with pre-commit-uv on our development machines our "pre-commit run --all mypy" has the same behaviour as with default pre-commit.
However, when running on gitlab CI, it looks like pre-commit is not creating a separate virtualenv with the dependencies on the "additional_dependencies" field, but it's running on the outer environment.

does it make any sense?

thanks

  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.15.0
    hooks:
      - id: mypy
        exclude: (bin)
        additional_dependencies:
          - deepdiff~=8.5.0

@gaborbernat
Copy link
Member

Sounds like a pre-commit bug. Did you try if it works with that only?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants