pytest学习实践-day37:05_pytest-pep8插件_代码格式检查--坑爹的pep8,经常报错

CMD:
1.安装:pip install pytest-pep8
2.本地目录执行: pytest .\02_pytest-flakes插件_静态代码检查.py --pep8
3.本地目录执行结果:

E:\python\Lib\site-packages\pep8.py:110: FutureWarning: Possible nested set at position 1
  EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')
================================================= test session starts =================================================
platform win32 -- Python 3.11.3, pytest-7.4.2, pluggy-1.3.0
rootdir: E:\learnPython\01_01_pytest插件使用
plugins: allure-pytest-2.13.2, assume-2.4.3, cov-4.1.0, flakes-4.0.5, html-4.0.2, metadata-3.0.0, ordering-0.6, pep8-1.0.6, picked-0.5.0, repeat-0.9.1, rerunfailures-12.0, xdist-3.3.1
collected 0 items / 1 error

======================================================= ERRORS ========================================================
____________________________________________ ERROR collecting test session ____________________________________________
Direct construction of pytest_pep8.Pep8Item has been deprecated, please use pytest_pep8.Pep8Item.from_parent.
See https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent for more details.
=============================================== short test summary info ===============================================
ERROR  - Failed: Direct construction of pytest_pep8.Pep8Item has been deprecated, please use pytest_pep8.Pep8Item.from_parent.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================== 1 error in 0.33s ===================================================
  • 5
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值