From c9d94967cff4f04d8adbe6f523a1cd4c1f705d4a Mon Sep 17 00:00:00 2001 From: Michael Harms Date: Fri, 6 Mar 2020 14:47:11 +0100 Subject: [PATCH] adding pydocstyle check to lint script --- poetry.lock | 29 ++++++++++++++++++++++++++++- pyproject.toml | 1 + scripts/lint.sh | 3 +++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index 1ccc5e4..651a570 100644 --- a/poetry.lock +++ b/poetry.lock @@ -297,6 +297,17 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" version = "2.5.0" +[[package]] +category = "dev" +description = "Python docstring style checker" +name = "pydocstyle" +optional = false +python-versions = ">=3.5" +version = "5.0.2" + +[package.dependencies] +snowballstemmer = "*" + [[package]] category = "dev" description = "python code static checker" @@ -439,6 +450,14 @@ nose = ["nose"] pytest = ["pytest"] test = ["six", "pytest (>=3.1.0)", "pytest-cov", "nose", "django (>=1.10.6)"] +[[package]] +category = "dev" +description = "This package provides 26 stemmers for 25 languages generated from Snowball algorithms." +name = "snowballstemmer" +optional = false +python-versions = "*" +version = "2.0.0" + [[package]] category = "dev" description = "Manage dynamic plugins for Python applications" @@ -530,7 +549,7 @@ docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["pathlib2", "contextlib2", "unittest2"] [metadata] -content-hash = "761800c5b5d4373c0c83aee25f2daa9e39c67b10788b6fac2e21bb26345df115" +content-hash = "a5640cebe8c416b76edad0449dee6c2fefb3fe074bd60931d7046fc5d4ddfabd" python-versions = "^3.6" [metadata.files] @@ -736,6 +755,10 @@ pycodestyle = [ {file = "pycodestyle-2.5.0-py2.py3-none-any.whl", hash = "sha256:95a2219d12372f05704562a14ec30bc76b05a5b297b21a5dfe3f6fac3491ae56"}, {file = "pycodestyle-2.5.0.tar.gz", hash = "sha256:e40a936c9a450ad81df37f549d676d127b1b66000a6c500caa2b085bc0ca976c"}, ] +pydocstyle = [ + {file = "pydocstyle-5.0.2-py3-none-any.whl", hash = "sha256:da7831660b7355307b32778c4a0dbfb137d89254ef31a2b2978f50fc0b4d7586"}, + {file = "pydocstyle-5.0.2.tar.gz", hash = "sha256:f4f5d210610c2d153fae39093d44224c17429e2ad7da12a8b419aba5c2f614b5"}, +] pylint = [ {file = "pylint-2.4.4-py3-none-any.whl", hash = "sha256:886e6afc935ea2590b462664b161ca9a5e40168ea99e5300935f6591ad467df4"}, {file = "pylint-2.4.4.tar.gz", hash = "sha256:3db5468ad013380e987410a8d6956226963aed94ecb5f9d3a28acca6d9ac36cd"}, @@ -788,6 +811,10 @@ smmap2 = [ snapshottest = [ {file = "snapshottest-0.5.1.tar.gz", hash = "sha256:2cc7157e77674ea8ebeb2351466ff50cd4b5ad8e213adc06df9c16a75ab5bafc"}, ] +snowballstemmer = [ + {file = "snowballstemmer-2.0.0-py2.py3-none-any.whl", hash = "sha256:209f257d7533fdb3cb73bdbd24f436239ca3b2fa67d56f6ff88e86be08cc5ef0"}, + {file = "snowballstemmer-2.0.0.tar.gz", hash = "sha256:df3bac3df4c2c01363f3dd2cfa78cce2840a79b9f1c2d2de9ce8d31683992f52"}, +] stevedore = [ {file = "stevedore-1.31.0-py2.py3-none-any.whl", hash = "sha256:01d9f4beecf0fbd070ddb18e5efb10567801ba7ef3ddab0074f54e3cd4e91730"}, {file = "stevedore-1.31.0.tar.gz", hash = "sha256:e0739f9739a681c7a1fda76a102b65295e96a144ccdb552f2ae03c5f0abe8a14"}, diff --git a/pyproject.toml b/pyproject.toml index 5d7d97f..cabc039 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,6 +38,7 @@ autopep8 = "^1.4.4" pytest-cov = "^2.8.1" snapshottest = "^0.5.1" pandas = "^0.25.3" +pydocstyle = "^5.0.2" [build-system] requires = ["poetry>=0.12"] diff --git a/scripts/lint.sh b/scripts/lint.sh index 1780915..0b2d276 100644 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -13,6 +13,9 @@ poetry run pylint --ignore=snapshots comcrawl tests || FAILURE=true echo "pycodestyle" poetry run pycodestyle --exclude=snapshots comcrawl tests || FAILURE=true +echo "pydocstyle" +poetry run pydocstyle comcrawl || FAILURE=true + echo "mypy" poetry run mypy comcrawl tests || FAILURE=true