Skip to content

Pre-commit hook poetry-lock not using expected python runtime #2586

@rafrafek

Description

@rafrafek

search you tried in the issue tracker

default_language_version wrong version

describe your issue

I want to use Python 3.11.0 for all hooks. It does not work with Poetry. Poetry uses 3.11.0, but poetry-lock hook for some reason uses 3.7.13.

image

Similar issue to:
python-poetry/poetry#6946

image

pre-commit --version

pre-commit 2.20.0

.pre-commit-config.yaml

default_language_version:
  python: python3.11.0
repos:
  - repo: https://github.com/psf/black
    rev: 22.10.0
    hooks:
      - id: black
        entry: black
  - repo: https://github.com/PyCQA/isort
    rev: 5.10.1
    hooks:
      - id: isort
  - repo: https://github.com/PyCQA/flake8
    rev: 5.0.4
    hooks:
      - id: flake8
        args: [ '--max-line-length=88' ]
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.3.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
  - repo: https://github.com/python-poetry/poetry
    rev: 1.2.2
    hooks:
      - id: poetry-check
      - id: poetry-lock
      - id: poetry-export

~/.cache/pre-commit/pre-commit.log (if present)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions