小编kon*_*erw的帖子

Tox:flake8 和 pylint 等工具的每个平台配置

我在 Linux 和 Windows 环境中都有 ci 的 tox.ini 配置,如下所示:

[tox]
envlist =
    {py3,py27}-{test,lint}-{linux,windows}
    flake8
    check-package
skip_missing_interpreters = true
isolated_build = True
distdir = dist

[testenv]
platform =
    linux: linux
    windows: win

# Reuse py3 and py27 envs for pylint
envdir =
    py3: {toxworkdir}/py3
    py27: {toxworkdir}/py27
    !py3-!py27: {toxworkdir}/{envname}
deps =
    py27: setuptools < 45.0.0

# test extras must include pytest and pylint
extras = test
commands =
    test: python -m pytest -c {toxinidir}/pytest.ini --junitxml=test-reports/pytest.{envname}.xml {posargs}
    lint: python -m pylint --rcfile=tox.ini src/displaylink …
Run Code Online (Sandbox Code Playgroud)

python pylint tox flake8

2
推荐指数
1
解决办法
2617
查看次数

标签 统计

flake8 ×1

pylint ×1

python ×1

tox ×1