Skip to content

Commit 9754ff6

Browse files
paw-luPaulo Costa
andauthored
Add flake8-rst-docstrings to linting rules (#70)
* Add flake8-rst-docstrings description * Add RST validation code * Add flake8-rst-docstrings to lint session * Add flake8-rst-docstrings via Poetry Co-authored-by: Paulo Costa <pcosta@firstrepublic.com>
1 parent de0f60f commit 9754ff6

File tree

5 files changed

+35
-3
lines changed

5 files changed

+35
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ The linter suite uses the following tools and Flake8 plugins:
5050
- [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) to detect bugs and design problems
5151
- [flake8-docstrings](https://gitlab.com/pycqa/flake8-docstrings) for integration with pydocstyle
5252
- [flake8-import-order](https://github.com/PyCQA/flake8-import-order) to check the order of import statements
53+
- [flake8-rst-docstrings](https://github.com/peterjc/flake8-rst-docstrings) to check that docstrings are valid reStructuredText
5354
- [mccabe](https://github.com/PyCQA/mccabe) to limit the code complexity
5455
- [pep8-naming](https://github.com/pycqa/pep8-naming) to enforce naming conventions from [PEP 8](http://www.python.org/dev/peps/pep-0008/)
5556
- [pycodestyle](https://github.com/pycqa/pycodestyle) to enforce style conventions from [PEP 8](http://www.python.org/dev/peps/pep-0008/)

{{cookiecutter.project_name}}/.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
2-
select = ANN,B,B9,BLK,C,D,DAR,E,F,I,N,S,W
2+
select = ANN,B,B9,BLK,C,D,DAR,E,F,I,N,RST,S,W
33
ignore = ANN101,E203,E501,W503
44
max-line-length = 80
55
max-complexity = 10

{{cookiecutter.project_name}}/noxfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ def lint(session: Session) -> None:
127127
"flake8-bugbear",
128128
"flake8-docstrings",
129129
"flake8-import-order",
130+
"flake8-rst-docstrings",
130131
"pep8-naming",
131132
"darglint",
132133
)

{{cookiecutter.project_name}}/poetry.lock

Lines changed: 31 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

{{cookiecutter.project_name}}/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ sphinx = "^2.3.1"
3939
sphinx-autodoc-typehints = "^1.10.3"
4040
recommonmark = "^0.6.0"
4141
pep8-naming = "^0.9.1"
42+
flake8-rst-docstrings = "^0.0.13"
4243

4344
[tool.poetry.scripts]
4445
{{cookiecutter.project_name}} = "{{cookiecutter.package_name}}.console:main"

0 commit comments

Comments
 (0)