From bff098306a37dd8a7760084cb84e63be47af4361 Mon Sep 17 00:00:00 2001 From: Max Brauer Date: Wed, 23 Mar 2016 14:05:53 +0100 Subject: [PATCH] Replaced pep257 with pydocstyle. Fixes #97 --- .travis.yml | 2 +- README.rst | 2 +- tox.ini | 4 ++-- {{ cookiecutter.repo_name }}/MANIFEST.in | 2 +- {{ cookiecutter.repo_name }}/{pep257.sh => pydocstyle.sh} | 4 ++-- {{ cookiecutter.repo_name }}/setup.cfg | 2 +- {{ cookiecutter.repo_name }}/tox.ini | 8 ++++---- 7 files changed, 12 insertions(+), 12 deletions(-) rename {{ cookiecutter.repo_name }}/{pep257.sh => pydocstyle.sh} (51%) diff --git a/.travis.yml b/.travis.yml index d982bf462..5999c1f2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ env: - TOXENV=project-tox-flake8 - TOXENV=project-tox-isort - TOXENV=project-tox-manifest - - TOXENV=project-tox-pep257 + - TOXENV=project-tox-pydocstyle - TOXENV=project-tox-py27 - TOXENV=project-tox-py35 - TOXENV=py27-project-develop diff --git a/README.rst b/README.rst index e5c5dafe9..171ccfce8 100644 --- a/README.rst +++ b/README.rst @@ -107,7 +107,7 @@ Lint Tools * `doc8 `_ * `flake8 `_ * `isort `_ -* `pep257 `_ +* `pydocstyle `_ Testing ------- diff --git a/tox.ini b/tox.ini index 0464d0b08..62c6e2d1c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,py34,py35,pypy,docs,flake8,isort,project-tox-{docs,flake8,isort,manifest,pep257,py27,py35},{py27,py34,py35}-project-develop +envlist = py27,py34,py35,pypy,docs,flake8,isort,project-tox-{docs,flake8,isort,manifest,pydocstyle,py27,py35},{py27,py34,py35}-project-develop minversion = 2.1.0 skipsdist = True @@ -13,7 +13,7 @@ commands = project-tox-flake8: tox -c my-project/tox.ini -e flake8 project-tox-isort: tox -c my-project/tox.ini -e isort project-tox-manifest: {toxinidir}/test_manifest.sh - project-tox-pep257: tox -c my-project/tox.ini -e pep257 + project-tox-pydocstyle: tox -c my-project/tox.ini -e pydocstyle project-tox-py27: tox -c my-project/tox.ini -e py27 project-tox-py35: tox -c my-project/tox.ini -e py35 deps = diff --git a/{{ cookiecutter.repo_name }}/MANIFEST.in b/{{ cookiecutter.repo_name }}/MANIFEST.in index db63f25fa..dc6da92c1 100644 --- a/{{ cookiecutter.repo_name }}/MANIFEST.in +++ b/{{ cookiecutter.repo_name }}/MANIFEST.in @@ -6,7 +6,7 @@ include tox.ini exclude .bumpversion.cfg exclude .editorconfig -exclude pep257.sh +exclude pydocstyle.sh recursive-include docs *.rst .gitkeep conf.py Makefile make.bat recursive-include requirements *.pip diff --git a/{{ cookiecutter.repo_name }}/pep257.sh b/{{ cookiecutter.repo_name }}/pydocstyle.sh similarity index 51% rename from {{ cookiecutter.repo_name }}/pep257.sh rename to {{ cookiecutter.repo_name }}/pydocstyle.sh index 6bf8917bb..d7336d855 100755 --- a/{{ cookiecutter.repo_name }}/pep257.sh +++ b/{{ cookiecutter.repo_name }}/pydocstyle.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # -# Find all Python files and check their docstrings with pep257. +# Find all Python files and check their docstrings with pydocstyle. set -o errexit set -o nounset set -o pipefail -find . -name '*.py' -not -path './.*/*' -not -path '*/migrations/*' -not -path './node_modules/*' -exec pep257 -s {} + +find . -name '*.py' -not -path './.*/*' -not -path '*/migrations/*' -not -path './node_modules/*' -exec pydocstyle -s {} + diff --git a/{{ cookiecutter.repo_name }}/setup.cfg b/{{ cookiecutter.repo_name }}/setup.cfg index 64cbdfc07..914e12fa6 100644 --- a/{{ cookiecutter.repo_name }}/setup.cfg +++ b/{{ cookiecutter.repo_name }}/setup.cfg @@ -22,7 +22,7 @@ known_first_party = {{ cookiecutter.pkg_name }},tests known_third_party = braces,configurations,coverage,crispy_forms,dj_database_url,django,envdir,factory,factory_boy,faker,fauxfactory,freezegun,grappelli,psycopg2,pytest,pytest_factoryboy,six skip = manage.py,migrations,wsgi.py -[pep257] +[pydocstyle] add-ignore = D100,D104 [pytest] diff --git a/{{ cookiecutter.repo_name }}/tox.ini b/{{ cookiecutter.repo_name }}/tox.ini index 97be23346..ba437f9bc 100644 --- a/{{ cookiecutter.repo_name }}/tox.ini +++ b/{{ cookiecutter.repo_name }}/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,py35,flake8,isort,manifest,docs,pep257 +envlist = py27,py35,flake8,isort,manifest,docs,pydocstyle minversion = 2.1.0 [testenv] @@ -37,12 +37,12 @@ deps = check-manifest==0.29 skip_install = True -[testenv:pep257] +[testenv:pydocstyle] basepython = python3.5 commands = - {toxinidir}/pep257.sh + {toxinidir}/pydocstyle.sh deps = - pep257==0.7.0 + pydocstyle==1.0.0 skip_install = True [testenv:docs]