Skip to content

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

New issue

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

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

Already on GitHub? Sign in to your account

Closed
weichslgartner opened this issue Oct 22, 2024 · 1 comment · Fixed by #723
Closed

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

weichslgartner opened this issue Oct 22, 2024 · 1 comment · Fixed by #723
Labels

Comments

@weichslgartner
Copy link
Contributor

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?

@weichslgartner weichslgartner changed the title pre-commit hook pre-commit hook fails with provided environments not found Oct 22, 2024
@jkowalleck
Copy link
Member

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.

weichslgartner added a commit to weichslgartner/cyclonedx-python-lib that referenced this issue Oct 23, 2024
saquibsaifee pushed a commit to saquibsaifee/cyclonedx-python-lib that referenced this issue Oct 27, 2024
saquibsaifee pushed a commit to saquibsaifee/cyclonedx-python-lib that referenced this issue Oct 27, 2024
Fixes CycloneDX#721

Signed-off-by: weichslgartner <[email protected]>
Signed-off-by: Saquib Saifee <[email protected]>
saquibsaifee pushed a commit to saquibsaifee/cyclonedx-python-lib that referenced this issue Oct 27, 2024
Fixes CycloneDX#721

Signed-off-by: weichslgartner <[email protected]>
Signed-off-by: Saquib Saifee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants