From 0d315d2467f1f69323ec7bf9c227f7f6d54d84db Mon Sep 17 00:00:00 2001 From: Brian Haley Date: Wed, 30 Nov 2022 16:51:30 -0500 Subject: [PATCH] Update .pylintrc Update .pylintrc to be stricter, for example, to enforce C0330 warnings (hanging/continued indentation). This should be the end of the series. Also did some cleanup of old unsupport options that pylint complains about when you run it. Change-Id: Id1bce82f584243b55a47fd6d5c5db81729e11f03 --- .pylintrc | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.pylintrc b/.pylintrc index 5095a59798f..cee0c978489 100644 --- a/.pylintrc +++ b/.pylintrc @@ -24,35 +24,27 @@ disable= abstract-method, arguments-differ, attribute-defined-outside-init, - bad-builtin, bad-indentation, broad-except, dangerous-default-value, - deprecated-lambda, expression-not-assigned, fixme, global-statement, keyword-arg-before-vararg, literal-comparison, - no-init, non-parent-init-called, not-callable, protected-access, redefined-builtin, redefined-outer-name, signature-differs, - star-args, super-init-not-called, - super-on-old-class, unpacking-non-sequence, unused-argument, unused-import, unused-variable, useless-super-delegation, -# TODO(dougwig) - disable nonstandard-exception while we have neutron_lib shims - nonstandard-exception, # "C" Coding convention violations - bad-continuation, consider-iterating-dictionary, consider-using-enumerate, invalid-name, @@ -63,13 +55,10 @@ disable= ungrouped-imports, wrong-import-order, # "R" Refactor recommendations - abstract-class-little-used, - abstract-class-not-used, consider-merging-isinstance, consider-using-ternary, duplicate-code, inconsistent-return-statements, - interface-not-implemented, no-else-return, no-self-use, redefined-argument-from-local, @@ -118,8 +107,11 @@ max-line-length=79 additional-builtins=_ [CLASSES] -# List of interface methods to ignore, separated by a comma. -ignore-iface-methods= +# List of valid names for the first argument in a class method. +valid-classmethod-first-arg=cls + +# List of valid names for the first argument in a metaclass class method. +valid-metaclass-classmethod-first-arg=cls [IMPORTS] # Deprecated modules which should not be used, separated by a comma