From d91845fd3683ecb0be843cc72e85ffa8e3f39657 Mon Sep 17 00:00:00 2001 From: "Peter A. Jonsson" Date: Sat, 21 Sep 2024 11:54:30 +0200 Subject: [PATCH 1/3] pylintrc: delete removed checks These options all give a warning on the form: R0022: Useless option value for '--enable', 'deprecated-urllib-function' was removed from pylint, see https://github.com/pylint-dev/pylint/pull/4942. (useless-option-value) --- pylintrc | 60 +------------------------------------------------------- 1 file changed, 1 insertion(+), 59 deletions(-) diff --git a/pylintrc b/pylintrc index f1622ed11e..e25c5bf722 100644 --- a/pylintrc +++ b/pylintrc @@ -10,76 +10,18 @@ disable=all # either give multiple identifier separated by comma (,) or put this option # multiple time (only on the command line, not in the configuration file where # it should appear only once). See also the "--disable" option for examples. -enable=print-statement, - parameter-unpacking, - unpacking-in-except, - old-raise-syntax, - backtick, - long-suffix, +enable=long-suffix, old-ne-operator, old-octal-literal, - import-star-module-level, non-ascii-bytes-literal, invalid-unicode-literal, c-extension-no-member, - apply-builtin, - basestring-builtin, - buffer-builtin, - cmp-builtin, - coerce-builtin, - execfile-builtin, - file-builtin, - long-builtin, - raw_input-builtin, - reduce-builtin, - standarderror-builtin, - unicode-builtin, - xrange-builtin, - coerce-method, - delslice-method, - getslice-method, - setslice-method, - dict-iter-method, - dict-view-method, - next-method-called, - metaclass-assignment, - indexing-exception, - raising-string, - reload-builtin, - oct-method, - hex-method, # nonzero-method, - cmp-method, - input-builtin, # round-builtin, - intern-builtin, - unichr-builtin, # map-builtin-not-iterating, # zip-builtin-not-iterating, # range-builtin-not-iterating, - filter-builtin-not-iterating, - using-cmp-argument, # eq-without-hash, - div-method, - idiv-method, - rdiv-method, - exception-message-attribute, - invalid-str-codec, - sys-max-int, - bad-python3-import, - deprecated-string-function, - deprecated-str-translate-call, - deprecated-itertools-function, - deprecated-types-field, - next-method-defined, - dict-items-not-iterating, - dict-keys-not-iterating, - dict-values-not-iterating, - deprecated-operator-function, - deprecated-urllib-function, - xreadlines-attribute, - deprecated-sys-function, - exception-escape, useless-import-alias From 89024dbe6801c9f120f82c3fa076e6529ecab451 Mon Sep 17 00:00:00 2001 From: "Peter A. Jonsson" Date: Sat, 21 Sep 2024 11:56:15 +0200 Subject: [PATCH 2/3] pylintrc: delete unknown options These options give a warning: W0012: Unknown option value for '--enable', expected a valid pylint message and got 'long-suffix' (unknown-option-value) so they have presumably been removed from pylint since the last pylintrc update in 2019. --- pylintrc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pylintrc b/pylintrc index e25c5bf722..e56e787534 100644 --- a/pylintrc +++ b/pylintrc @@ -10,12 +10,7 @@ disable=all # either give multiple identifier separated by comma (,) or put this option # multiple time (only on the command line, not in the configuration file where # it should appear only once). See also the "--disable" option for examples. -enable=long-suffix, - old-ne-operator, - old-octal-literal, - non-ascii-bytes-literal, - invalid-unicode-literal, - c-extension-no-member, +enable=c-extension-no-member, # nonzero-method, # round-builtin, # map-builtin-not-iterating, From 221142042d350b69cfb8ec3c82b452fa8981b90d Mon Sep 17 00:00:00 2001 From: "Peter A. Jonsson" Date: Sat, 21 Sep 2024 11:58:21 +0200 Subject: [PATCH 3/3] query: remov pylint disable The rule has been removed from pylint, so remove the disable line. --- datacube/api/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datacube/api/query.py b/datacube/api/query.py index 62d9804a45..4a85670a43 100644 --- a/datacube/api/query.py +++ b/datacube/api/query.py @@ -233,7 +233,7 @@ def query_group_by(group_by='time', **kwargs): return group_by_map[group_by] except KeyError: raise LookupError( - f'No group by function for {group_by}, valid options are: {group_by_map.keys()}', # pylint: disable=W1655 + f'No group by function for {group_by}, valid options are: {group_by_map.keys()}', )