From 1356db398d8417a2acb0cb4ad4d71be4b7799a82 Mon Sep 17 00:00:00 2001 From: Sejal Date: Tue, 28 Nov 2023 14:42:06 -0500 Subject: [PATCH 01/10] Pylint Enabled remaining pylint defaults Signed-off-by: Sejal Verma --- setup.cfg | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setup.cfg b/setup.cfg index 1437bc0e..82aacfa9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,3 +16,12 @@ profile=black [mypy] ignore_missing_imports=True + +[pylint] +enable = missing-function-docstring, missing-class-docstring, protected-access, duplicate-code, no-member, +missing-module-docstring, unused-argument, consider-using-f-string, super-with-arguments, too-few-public-methods, +redefined-builtin, line-too-long, too-many-arguments, redefined-outer-name, import-outside-toplevel, +useless-object-inheritance, unused-variable, unexpected-keyword-arg, raise-missing-from, too-many-locals, +unnecessary-dunder-call, wrong-import-position, too-many-public-methods, invalid-unary-operand-type, +attribute-defined-outside-init, unspecified-encoding, no-else-return, invalid-overridden-method, cyclic-import, +too-many-branches, dangerous-default-value, arguments-renamed, pointless-statement From a0d8b2d1145b0dde1250de68bb65aba5fff8b3d4 Mon Sep 17 00:00:00 2001 From: Sejal Date: Tue, 28 Nov 2023 14:42:06 -0500 Subject: [PATCH 02/10] Pylint Enabled remaining pylint defaults Signed-off-by: Sejal Verma Signed-off-by: Sejal --- setup.cfg | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setup.cfg b/setup.cfg index 1437bc0e..82aacfa9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,3 +16,12 @@ profile=black [mypy] ignore_missing_imports=True + +[pylint] +enable = missing-function-docstring, missing-class-docstring, protected-access, duplicate-code, no-member, +missing-module-docstring, unused-argument, consider-using-f-string, super-with-arguments, too-few-public-methods, +redefined-builtin, line-too-long, too-many-arguments, redefined-outer-name, import-outside-toplevel, +useless-object-inheritance, unused-variable, unexpected-keyword-arg, raise-missing-from, too-many-locals, +unnecessary-dunder-call, wrong-import-position, too-many-public-methods, invalid-unary-operand-type, +attribute-defined-outside-init, unspecified-encoding, no-else-return, invalid-overridden-method, cyclic-import, +too-many-branches, dangerous-default-value, arguments-renamed, pointless-statement From 37f94333f606ee78ae9667061005d9c9fe2f4759 Mon Sep 17 00:00:00 2001 From: Sejal Verma <143578862+sejal-verma@users.noreply.github.com> Date: Wed, 29 Nov 2023 00:04:54 -0500 Subject: [PATCH 03/10] Update setup.cfg Signed-off-by: Sejal Verma <143578862+sejal-verma@users.noreply.github.com> --- setup.cfg | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/setup.cfg b/setup.cfg index 7fa29262..a212e36c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,16 +23,17 @@ target-version = 'py33' ignore_missing_imports=True [pylint] -enable = missing-function-docstring, missing-class-docstring, protected-access, duplicate-code, no-member, + +max-line-length = 240 +good-names-rgxs = ^[_a-z][_a-z0-9]?$ # allow for 1-character variable names + +[pylint.MESSAGE CONTROL] +disable = all +enable = line-too-long, invalid-name, pointless-statement, + missing-function-docstring, missing-class-docstring, protected-access, duplicate-code, no-member, missing-module-docstring, unused-argument, consider-using-f-string, super-with-arguments, too-few-public-methods, redefined-builtin, line-too-long, too-many-arguments, redefined-outer-name, import-outside-toplevel, useless-object-inheritance, unused-variable, unexpected-keyword-arg, raise-missing-from, too-many-locals, unnecessary-dunder-call, wrong-import-position, too-many-public-methods, invalid-unary-operand-type, attribute-defined-outside-init, unspecified-encoding, no-else-return, invalid-overridden-method, cyclic-import, too-many-branches, dangerous-default-value, arguments-renamed, pointless-statement -max-line-length = 240 -good-names-rgxs = ^[_a-z][_a-z0-9]?$ # allow for 1-character variable names - -[pylint.MESSAGE CONTROL] -disable = all -enable = line-too-long, invalid-name, pointless-statement \ No newline at end of file From 5710bb5612f347a4f0bb15ed25086b2714342755 Mon Sep 17 00:00:00 2001 From: Sejal Verma <143578862+sejal-verma@users.noreply.github.com> Date: Wed, 29 Nov 2023 00:09:13 -0500 Subject: [PATCH 04/10] Update setup.cfg Signed-off-by: Sejal Verma <143578862+sejal-verma@users.noreply.github.com> --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index a212e36c..cdb164ab 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,7 +29,7 @@ good-names-rgxs = ^[_a-z][_a-z0-9]?$ # allow for 1-character variable names [pylint.MESSAGE CONTROL] disable = all -enable = line-too-long, invalid-name, pointless-statement, +enable = line-too-long, invalid-name, pointless-statement, missing-function-docstring, missing-class-docstring, protected-access, duplicate-code, no-member, missing-module-docstring, unused-argument, consider-using-f-string, super-with-arguments, too-few-public-methods, redefined-builtin, line-too-long, too-many-arguments, redefined-outer-name, import-outside-toplevel, From 316e47cfaa4075e4b3758e7b18aaff42d0055dc0 Mon Sep 17 00:00:00 2001 From: Sejal Verma <143578862+sejal-verma@users.noreply.github.com> Date: Wed, 29 Nov 2023 00:09:57 -0500 Subject: [PATCH 05/10] Update setup.cfg Signed-off-by: Sejal Signed-off-by: Sejal Verma <143578862+sejal-verma@users.noreply.github.com> --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index cdb164ab..1b7221bf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -36,4 +36,4 @@ enable = line-too-long, invalid-name, pointless-statement, useless-object-inheritance, unused-variable, unexpected-keyword-arg, raise-missing-from, too-many-locals, unnecessary-dunder-call, wrong-import-position, too-many-public-methods, invalid-unary-operand-type, attribute-defined-outside-init, unspecified-encoding, no-else-return, invalid-overridden-method, cyclic-import, - too-many-branches, dangerous-default-value, arguments-renamed, pointless-statement + too-many-branches, dangerous-default-value, arguments-renamed, pointless-statement From 7271038b180488fb2b5e87f9cdcc89e57f92a022 Mon Sep 17 00:00:00 2001 From: Sejal Verma <143578862+sejal-verma@users.noreply.github.com> Date: Wed, 29 Nov 2023 00:22:09 -0500 Subject: [PATCH 06/10] Update CHANGELOG.md Signed-off-by: Sejal Signed-off-by: Sejal Verma <143578862+sejal-verma@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe4d309e..0ef1a579 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] ### Added +- Added pylint `missing-function-docstring`, `missing-class-docstring`, `protected-access`, `duplicate-code`, `no-member`, + `missing-module-docstring`, `unused-argument`, `consider-using-f-string`, `super-with-arguments`, `too-few-public-methods`, + `redefined-builtin`, `line-too-long`, `too-many-arguments`, `redefined-outer-name`, `import-outside-toplevel`, + `useless-object-inheritance`, `unused-variable`, `unexpected-keyword-arg`, `raise-missing-from`, `too-many-locals`, + `unnecessary-dunder-call`, `wrong-import-position`, `too-many-public-methods`, `invalid-unary-operand-type`, + `attribute-defined-outside-init`, `unspecified-encoding`, `no-else-return`, `invalid-overridden-method`, `cyclic-import`, + `too-many-branches`, `dangerous-default-value`, `arguments-renamed`, `pointless-statement` ([#620](https://github.com/opensearch-project/opensearch-py/pull/620)) - Added pylint `line-too-long` and `invalid-name` ([#590](https://github.com/opensearch-project/opensearch-py/pull/590)) - Added pylint `pointless-statement` ([#611](https://github.com/opensearch-project/opensearch-py/pull/611)) - Added a log collection guide ([#579](https://github.com/opensearch-project/opensearch-py/pull/579)) From cc4155f9e8515a065fc35fe326be12814bcd103c Mon Sep 17 00:00:00 2001 From: Sejal Date: Wed, 29 Nov 2023 12:55:09 -0500 Subject: [PATCH 07/10] Pylint Enabled remaining pylint defaults Signed-off-by: Sejal --- setup.cfg | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/setup.cfg b/setup.cfg index 7fa29262..8d6e5776 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,16 +23,16 @@ target-version = 'py33' ignore_missing_imports=True [pylint] -enable = missing-function-docstring, missing-class-docstring, protected-access, duplicate-code, no-member, - missing-module-docstring, unused-argument, consider-using-f-string, super-with-arguments, too-few-public-methods, - redefined-builtin, line-too-long, too-many-arguments, redefined-outer-name, import-outside-toplevel, - useless-object-inheritance, unused-variable, unexpected-keyword-arg, raise-missing-from, too-many-locals, - unnecessary-dunder-call, wrong-import-position, too-many-public-methods, invalid-unary-operand-type, - attribute-defined-outside-init, unspecified-encoding, no-else-return, invalid-overridden-method, cyclic-import, - too-many-branches, dangerous-default-value, arguments-renamed, pointless-statement max-line-length = 240 good-names-rgxs = ^[_a-z][_a-z0-9]?$ # allow for 1-character variable names [pylint.MESSAGE CONTROL] disable = all -enable = line-too-long, invalid-name, pointless-statement \ No newline at end of file +enable = line-too-long, invalid-name, pointless-statement, + missing-function-docstring, missing-class-docstring, protected-access, duplicate-code, no-member, + missing-module-docstring, unused-argument, consider-using-f-string, super-with-arguments, too-few-public-methods, + redefined-builtin, line-too-long, too-many-arguments, redefined-outer-name, import-outside-toplevel, + useless-object-inheritance, unused-variable, unexpected-keyword-arg, raise-missing-from, too-many-locals, + unnecessary-dunder-call, wrong-import-position, too-many-public-methods, invalid-unary-operand-type, + attribute-defined-outside-init, unspecified-encoding, no-else-return, invalid-overridden-method, cyclic-import, + too-many-branches, dangerous-default-value, arguments-renamed, pointless-statement \ No newline at end of file From ba356032995edcb625297d4890b1ae7d60ffffbd Mon Sep 17 00:00:00 2001 From: Sejal Date: Mon, 4 Dec 2023 22:01:27 -0500 Subject: [PATCH 08/10] Enabled remaining pylint defaults Signed-off-by: Sejal --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 8d6e5776..63f81a68 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,7 +24,7 @@ ignore_missing_imports=True [pylint] max-line-length = 240 -good-names-rgxs = ^[_a-z][_a-z0-9]?$ # allow for 1-character variable names +good-names-rgxs = ^[_a-z][_a-z0-9]?$ # allow for 1-character variable name [pylint.MESSAGE CONTROL] disable = all From fa13956210f470403e72ad7ba6df0b0b83e2a792 Mon Sep 17 00:00:00 2001 From: Sejal Date: Mon, 4 Dec 2023 22:04:30 -0500 Subject: [PATCH 09/10] Enabled remaining pylint defaults Signed-off-by: Sejal --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 63f81a68..8d6e5776 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,7 +24,7 @@ ignore_missing_imports=True [pylint] max-line-length = 240 -good-names-rgxs = ^[_a-z][_a-z0-9]?$ # allow for 1-character variable name +good-names-rgxs = ^[_a-z][_a-z0-9]?$ # allow for 1-character variable names [pylint.MESSAGE CONTROL] disable = all From 993c46f535a61d148a1f24a158743e4fced2d10b Mon Sep 17 00:00:00 2001 From: Sejal Date: Mon, 4 Dec 2023 22:07:39 -0500 Subject: [PATCH 10/10] Enabled remaining pylint defaults Signed-off-by: Sejal --- setup.cfg | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/setup.cfg b/setup.cfg index 8d6e5776..202b879d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,9 +30,10 @@ good-names-rgxs = ^[_a-z][_a-z0-9]?$ # allow for 1-character variable names disable = all enable = line-too-long, invalid-name, pointless-statement, missing-function-docstring, missing-class-docstring, protected-access, duplicate-code, no-member, - missing-module-docstring, unused-argument, consider-using-f-string, super-with-arguments, too-few-public-methods, - redefined-builtin, line-too-long, too-many-arguments, redefined-outer-name, import-outside-toplevel, - useless-object-inheritance, unused-variable, unexpected-keyword-arg, raise-missing-from, too-many-locals, - unnecessary-dunder-call, wrong-import-position, too-many-public-methods, invalid-unary-operand-type, - attribute-defined-outside-init, unspecified-encoding, no-else-return, invalid-overridden-method, cyclic-import, - too-many-branches, dangerous-default-value, arguments-renamed, pointless-statement \ No newline at end of file + missing-module-docstring, unused-argument, consider-using-f-string, super-with-arguments, + too-few-public-methods, redefined-builtin, line-too-long, too-many-arguments, redefined-outer-name, + import-outside-toplevel, useless-object-inheritance, unused-variable, unexpected-keyword-arg, + raise-missing-from, too-many-locals, unnecessary-dunder-call, wrong-import-position, too-many-public-methods, + invalid-unary-operand-type, attribute-defined-outside-init, unspecified-encoding, no-else-return, + invalid-overridden-method, cyclic-import, too-many-branches, dangerous-default-value, arguments-renamed, + pointless-statement \ No newline at end of file