pre-commit今天突然开始在我们的构建中安装isort钩子失败,并出现以下错误

[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]+$'

这似乎与诗歌构型有关..

推荐答案

将钩子升级到新发布的isort5.12.0似乎可以解决这个问题.

从isort repo的提交堆栈来看,最近版本的Pory似乎有一个与isort<;=5.11.4(commit)不兼容的重大更改

Python相关问答推荐

如何随着收件箱的增加动态添加到HTML表的右下角?

在pandas DataFrame上运行apply()时如何访问DateTime索引?

日程优化问题不知道更好的方式来呈现解决方案- Python / Gekko

使用imap-tools时错误,其邮箱地址包含域名中的非默认字符

收件箱转换错误- polars.exceptions. ComputeHelp- pandera(0.19.0b3)带有polars

过载功能是否包含Support Int而不是Support Int?

DuckDB将蜂巢分区插入拼花文件

Python中是否有方法从公共域检索搜索结果

Python 3.12中的通用[T]类方法隐式类型检索

滚动和,句号来自Pandas列

将整组数组拆分为最小值与最大值之和的子数组

抓取rotowire MLB球员新闻并使用Python形成表格

使用索引列表列表对列进行切片并获取行方向的向量长度

用Python解密Java加密文件

Python键入协议默认值

Pandas—合并数据帧,在公共列上保留非空值,在另一列上保留平均值

梯度下降:简化要素集的运行时间比原始要素集长

关于Python异步编程的问题和使用await/await def关键字

Pandas计数符合某些条件的特定列的数量

如何在turtle中不使用write()来绘制填充字母(例如OEG)