事前コミットが「RuntimeError: The Poetry configuration is invalid」というエラーで isort 5.11.4 のインストールに失敗しました 質問する

事前コミットが「RuntimeError: The Poetry configuration is invalid」というエラーで isort 5.11.4 のインストールに失敗しました 質問する

事前コミット突然インストールに失敗し始めた並べ替え本日のビルドで次のエラーが発生しています

[INFO] Installing environment for https://github.com/pycqa/isort.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/builds/.../.cache/pre-commit/repo0_h0f938/py_env-python3.8/bin/python', '-mpip', 'install', '.')
return code: 1
expected return code: 0
[...]
stderr:
      ERROR: Command errored out with exit status 1:
[...]
        File "/tmp/pip-build-env-_3j1398p/overlay/lib/python3.8/site-packages/poetry/core/masonry/api.py", line 40, in prepare_metadata_for_build_wheel
          poetry = Factory().create_poetry(Path(".").resolve(), with_groups=False)
        File "/tmp/pip-build-env-_3j1398p/overlay/lib/python3.8/site-packages/poetry/core/factory.py", line 57, in create_poetry
          raise RuntimeError("The Poetry configuration is invalid:\n" + message)
      RuntimeError: The Poetry configuration is invalid:
        - [extras.pipfile_deprecated_finder.2] 'pip-shims<=0.3.4' does not match '^[a-zA-Z-_.0-9]+$'

詩の構成に関係があるようです。

ベストアンサー1

フックを新しくリリースされた isort 5.12.0 にアップグレードすると、問題が解決するようです。

isort リポジトリのコミットスタックを見ると、最近のバージョンの Poetry には、isort <= 5.11.4 と互換性のない変更があったようです (専念

おすすめ記事