From 435fe79c046052e57abddeaa6079d1a74dd1c7a1 Mon Sep 17 00:00:00 2001 From: Deepyaman Datta Date: Tue, 7 Jun 2022 06:56:23 -0400 Subject: [PATCH 1/2] Align formatting of `register_pipelines` docstring (#1582) Signed-off-by: Deepyaman Datta --- docs/source/tutorial/create_pipelines.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/source/tutorial/create_pipelines.md b/docs/source/tutorial/create_pipelines.md index 7de10b988f..d544baf93d 100644 --- a/docs/source/tutorial/create_pipelines.md +++ b/docs/source/tutorial/create_pipelines.md @@ -169,8 +169,7 @@ def register_pipelines() -> Dict[str, Pipeline]: """Register the project's pipeline. Returns: - A mapping from a pipeline name to a ``Pipeline`` object. - + A mapping from a pipeline name to a ``Pipeline`` object. """ data_processing_pipeline = dp.create_pipeline() From 8f4b81a345d6b7a0702edb0623cf99d51a085a22 Mon Sep 17 00:00:00 2001 From: Deepyaman Datta Date: Wed, 8 Jun 2022 06:57:54 -0400 Subject: [PATCH 2/2] Update config to be compatible with `pylint>=2.14` (#1595) * Remove "bad-continuation" rule removed from pylint Signed-off-by: Deepyaman Datta * Load "pylint.extensions.no_self_use" for `pylint>=2.14` Signed-off-by: Deepyaman Datta * Ignore pylint warning from testing context manager Signed-off-by: Deepyaman Datta * Ignore the "unnecessary" lambda assignment warning Signed-off-by: Deepyaman Datta --- pyproject.toml | 6 ++++-- tests/extras/datasets/pandas/test_hdf_dataset.py | 5 ++++- tests/pipeline/test_node.py | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c7921f7dad..8f3fb27ba2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,12 +14,14 @@ default_section = "THIRDPARTY" [tool.pylint.master] ignore = "CVS" ignore-patterns = "kedro/templates/*" -load-plugins = "pylint.extensions.docparams" +load-plugins = [ + "pylint.extensions.docparams", + "pylint.extensions.no_self_use" +] unsafe-load-any-extension = false [tool.pylint.messages_control] disable = [ "ungrouped-imports", - "bad-continuation", "duplicate-code" ] enable = ["useless-suppression"] diff --git a/tests/extras/datasets/pandas/test_hdf_dataset.py b/tests/extras/datasets/pandas/test_hdf_dataset.py index 9413894ba0..74dabf95f7 100644 --- a/tests/extras/datasets/pandas/test_hdf_dataset.py +++ b/tests/extras/datasets/pandas/test_hdf_dataset.py @@ -133,7 +133,10 @@ def test_thread_lock_usage(self, hdf_data_set, dummy_dataframe, mocker): mocked_lock.assert_not_called() hdf_data_set.save(dummy_dataframe) - calls = [mocker.call.__enter__(), mocker.call.__exit__(None, None, None)] + calls = [ + mocker.call.__enter__(), # pylint: disable=unnecessary-dunder-call + mocker.call.__exit__(None, None, None), + ] mocked_lock.assert_has_calls(calls) mocked_lock.reset_mock() diff --git a/tests/pipeline/test_node.py b/tests/pipeline/test_node.py index 8291d5f391..b02a1552ad 100644 --- a/tests/pipeline/test_node.py +++ b/tests/pipeline/test_node.py @@ -300,7 +300,7 @@ def dummy_func_args(**kwargs): return dummy_func_args, "A", "B" -lambda_identity = lambda input1: input1 # noqa: disable=E731 +lambda_identity = lambda input1: input1 # noqa: disable=E731 # pylint: disable=C3001 def lambda_inconsistent_input_size():