Skip to content

Commit 8e0b1d7

Browse files
committed
Add pydoc warnings to flake8 config
Also add flake8-docstrings as an additional dependency in the .pre-commit-config.yml file.
1 parent 916d7d5 commit 8e0b1d7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.flake8

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ max-line-length = 80
33
# Select (turn on)
44
# * Complexity violations reported by mccabe (C) -
55
# http://flake8.pycqa.org/en/latest/user/error-codes.html#error-violation-codes
6+
# * Documentation conventions compliance reported by pydocstyle (D) -
7+
# http://www.pydocstyle.org/en/stable/error_codes.html
68
# * Default errors and warnings reported by pycodestyle (E and W) -
79
# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
810
# * Default errors reported by pyflakes (F) -
@@ -11,7 +13,7 @@ max-line-length = 80
1113
# https://github.com/PyCQA/flake8-bugbear#list-of-warnings
1214
# * The B950 flake8-bugbear opinionated warning -
1315
# https://github.com/PyCQA/flake8-bugbear#opinionated-warnings
14-
select = C,E,F,W,B,B950
16+
select = C,D,E,F,W,B,B950
1517
# Ignore flake8's default warning about maximum line length, which has
1618
# a hard stop at the configured value. Instead we use
1719
# flake8-bugbear's B950, which allows up to 10% overage.

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ repos:
4242
rev: 3.7.7
4343
hooks:
4444
- id: flake8
45+
additional_dependencies:
46+
- flake8-docstrings
4547
- repo: https://github.com/asottile/pyupgrade
4648
rev: v1.14.0
4749
hooks:

0 commit comments

Comments
 (0)