From 867ab917db2abce812157ea6635eb4fde4282850 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 24 Mar 2020 18:39:50 +0100 Subject: [PATCH] Pylint: allow using pass even when not strictly necessary If we take the trouble of using pass, it's because we think the code is clearer that way. For example, Pylint 2.4 rejects pass in def foo(): """Do nothing.""" pass But relying on a docstring as the sole code is weird, hence the use of pass. Signed-off-by: Gilles Peskine --- .pylintrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.pylintrc b/.pylintrc index f82d4cfc0..262b5cf04 100644 --- a/.pylintrc +++ b/.pylintrc @@ -55,7 +55,9 @@ max-module-lines=2000 # return value1 # else: # return value2 -disable=logging-format-interpolation,no-else-return +# * unnecessary-pass: If we take the trouble of adding a line with "pass", +# it's because we think the code is clearer that way. +disable=logging-format-interpolation,no-else-return,unnecessary-pass [REPORTS] # Don't diplay statistics. Just the facts.