【问题标题】:Running pylint causes errors at the end运行 pylint 最后会导致错误
【发布时间】:2021-09-06 07:26:45
【问题描述】:

每当我运行 pylint 来检查我的 Python 脚本是否符合 PEP8 标准时,最后都会出错。

所以,当我跑步时

pylint script.py

它实际上会产生 pylint 结果,但最后也会打印以下错误:

Unable to create directory C:\Users\USER\AppData\Local\pylint\pylint\Cache
Unable to create file C:\Users\USER\AppData\Local\pylint\pylint\Cache\api1.stats: [Errno 2] No such file or directory: 'C:\\Users\\USER\\AppData\\Local\\pylint\\pylint\\Cache\\api1.stats'

这是一个问题,因为我试图从一个 makefile 运行多个 pylint,并且错误在第一个之后停止它。

【问题讨论】:

    标签: python makefile pylint


    【解决方案1】:

    这是由于https://github.com/PyCQA/pylint/issues/4900的原因,你可以先自己创建缓存目录,或者等待pylint 2.11.0中的主流修复。

    【讨论】:

    • 谢谢,现在手动创建缓存文件夹确实删除了错误消息。
    猜你喜欢
    • 1970-01-01
    • 2020-08-01
    • 2021-07-17
    • 1970-01-01
    • 2022-08-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多