From 513e4d5236bebb25c7938dc0d43d1282cc9ea7f7 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 19 Feb 2016 18:05:51 +0100 Subject: [PATCH] Switch to flake8-docstrings with pydocstyle We used to use flake8-pep257 because docstrings claims no codes are ignorable (which is wrong). However, that doesn't work with pydocstyle, so we had a separate pydocstyle environment (and flake8-pep257 to check tests with relaxed rules). Now we only use flake8-docstrings + pydocstyle (which it switches to if it's available, even though it still depends on pep257), and drop the pydocstyle tox env. As soon as flake8-docstrings is updated to drop the (unneeded) pep257 dependency, we can drop it as well. --- .travis.yml | 3 --- tox.ini | 14 ++++---------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 658bee4c1..c72a05059 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,6 @@ env: - TESTENV=unittests-nodisp - TESTENV=misc - TESTENV=vulture - - TESTENV=pydocstyle - TESTENV=flake8 - TESTENV=pyroma - TESTENV=check-manifest @@ -52,8 +51,6 @@ matrix: env: TESTENV=misc - os: osx env: TESTENV=vulture - - os: osx - env: TESTENV=pydocstyle - os: osx env: TESTENV=flake8 - os: osx diff --git a/tox.ini b/tox.ini index 40da3f154..9166a4bc1 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py34,py35-cov,misc,vulture,pydocstyle,flake8,pylint,pyroma,check-manifest +envlist = py34,py35-cov,misc,vulture,flake8,pylint,pyroma,check-manifest [testenv] # https://bitbucket.org/hpk42/tox/issue/246/ - only needed for Windows though @@ -149,13 +149,6 @@ commands = {envpython} -m pylint scripts qutebrowser --output-format=colorized --reports=no {envpython} scripts/dev/run_pylint_on_tests.py --output-format=colorized --reports=no -[testenv:pydocstyle] -basepython = python3 -skip_install = true -passenv = PYTHON LANG -deps = pydocstyle==1.0.0 -commands = {envpython} -m pydocstyle scripts tests qutebrowser - [testenv:flake8] basepython = python3 passenv = @@ -174,8 +167,9 @@ deps = flake8-deprecated==0.2 flake8-mock==0.2 flake8-pep3101==0.2 - flake8-pep257==1.0.5 - pep257==0.7.0 + flake8-docstrings==0.2.5 + pep257==0.7.0 # still needed by flake8-docstrings but ignored + pydocstyle==1.0.0 commands = {envpython} -m flake8