From c60d06a915fbb2490c7c1d8fbb96ad253ef4bea0 Mon Sep 17 00:00:00 2001 From: Antti Kaihola <13725+akaihola@users.noreply.github.com> Date: Tue, 10 Jan 2023 23:15:26 +0200 Subject: [PATCH] Configure flake8-docstrings and darglint --- setup.cfg | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/setup.cfg b/setup.cfg index f80a8c062..afa7e0624 100644 --- a/setup.cfg +++ b/setup.cfg @@ -81,10 +81,26 @@ max-line-length = 88 ignore = # C408 Unnecessary dict call - rewrite as a literal. C408 + # D400 First line should end with a period (from flake8-docstrings) + D400 + # D415 First line should end with a period, question mark, or exclamation point + D415 # E231 missing whitespace after ',' E231 # W503 line break before binary operator W503 +# Darglint options when run as a Flake8 plugin: +strictness = short +docstring_style = sphinx +# This requires https://github.com/terrencepreilly/darglint/pull/210: +darglint_ignore_regex=^test_ + +[darglint] +# Run `darglint --verbosity=2` to get nice descriptions in messages. +# Unfortunately `verbosity` isn't read from the configuration file. +message_template = {path}:{line}: {msg} {msg_id} {obj} +docstring_style = sphinx +ignore_regex = ^test_ [codespell] ignore-words-list = nd