CycloneDX / cyclonedx-python-lib

Python implementation of OWASP CycloneDX
https://cyclonedx.org/
Apache License 2.0
69 stars 39 forks source link

pre-commit hook fails with provided environments not found #721

Closed weichslgartner closed 2 days ago

weichslgartner commented 3 days ago

The pre-commit hook fails for me as follows:

mypy.....................................................................Failed
- hook id: system
- exit code: 254

ROOT: HandledError| provided environments not found in configuration file:
mypy-locked

in the .pre-commit-config.yaml has the entry:

entry: poetry run tox -e mypy-locked

the tox.ini looks like:

[tox]
minversion = 4.0
envlist =
    flake8
    mypy-{current,lowest}
    py{313,312,311,310,39,38}-{allExtras,noExtras}
    bandit

If i change it to mypy-{current,lowest,locked} it works for me. Am i missing something? Where does the mypy-locked env come from?

jkowalleck commented 3 days ago

Thank you bringing this to my attention, @weichslgartner 👍 .

The mypy-locked existed a long while ago. It was dropped in favor of the -current/-lowest solution. I personally do not use these hooks, so I probably forgot to migrate them.

If you are a user of this feature, please pullrequest a fix. I guess mypy-current should be enough in the hook.