From ff9148a2a2bc58a18f8f0a0983a52a5a9d778600 Mon Sep 17 00:00:00 2001 From: Stephen Rosen Date: Fri, 25 Aug 2023 10:36:18 -0500 Subject: [PATCH] Move pylint config into setup.cfg and cleanup Mostly a lift-and-shift of config, but also the disable list comments can be made clearer. Leave an important note about accept-no-param-doc, but leave the setting commented out. Currently we have 68 failures, too many for a quick fix, so this will be a process to resolve. --- .pylintrc | 41 ----------------------------------------- setup.cfg | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 41 deletions(-) delete mode 100644 .pylintrc diff --git a/.pylintrc b/.pylintrc deleted file mode 100644 index 64c4e433a..000000000 --- a/.pylintrc +++ /dev/null @@ -1,41 +0,0 @@ -[MASTER] -load-plugins = pylint.extensions.docparams - -[MESSAGES CONTROL] -# ignore rules as follows: -# -# format,C,R -# formatting and cosmetic rules which are handled by `black`, `isort`, and -# other tools -# refactoring rules (e.g. duplicate or similar code) which are very prone to -# false positives -# -# import-error -# pylint fails to import a module which is used at runtime, these warnings -# impede simple usage as in `cd globus_sdk; pylint src/` -# -# protected-access -# "disallowed" usage of our own classes and objects gets underfoot -# -# logging-*-interpolation -# objections to log messages doing eager (vs lazy) string formatting -# this is potentially an area for improvement -# -# fixme -# these comments are often useful; re-enable this to quickly find FIXME and -# TODO comments -# -# missing-raises-doc -# most SDK methods currently do not document the exceptions which they raise -# this is an area for improvement -disable = - format,C,R, - import-error, - protected-access, - logging-fstring-interpolation, - logging-format-interpolation, - fixme, - missing-raises-doc, - -[VARIABLES] -ignored-argument-names = args|kwargs diff --git a/setup.cfg b/setup.cfg index fc3c994f7..475c61996 100644 --- a/setup.cfg +++ b/setup.cfg @@ -106,3 +106,40 @@ categories = Documentation Security Development + + +[pylint] +load-plugins = pylint.extensions.docparams + +# accept-no-param-doc makes docparams behave as desired/expected and flag any +# method with missing param docs +# toggle this on and off manually until we can get the number of failures +# to 0, then leave it on +# +# accept-no-param-doc = false +[pylint.messages control] +disable = + # formatting and cosmetic rules (handled by 'black', etc) + format, C, + # refactoring rules (e.g. duplicate or similar code) are very prone to + # false positives + R, + # emitted when pylint fails to import a module; these warnings + # are usually false-positives for optional dependencies + import-error, + # "disallowed" usage of our own classes and objects gets underfoot + protected-access, + # logging-*-interpolation + # objections to log messages doing eager (vs lazy) string formatting + # this is potentially an area for improvement, but the benefit of deferred + # logging doesn't always outweigh the readability cost + logging-fstring-interpolation, + logging-format-interpolation, + # fixme comments are often useful; re-enable this to quickly find FIXME and + # TODO comments + fixme, + # most SDK methods currently do not document the exceptions which they raise + # this is an area for potential improvement + missing-raises-doc, +[pylint.variables] +ignored-argument-names = args|kwargs