From 44d82457230d7201a045c8cc58b13f0bec118c33 Mon Sep 17 00:00:00 2001 From: Ankita Katiyar <110245118+ankatiyar@users.noreply.github.com> Date: Thu, 17 Oct 2024 11:55:31 +0100 Subject: [PATCH] ci(datasets): Fix mypy errors (#893) --- kedro-datasets/CONTRIBUTING.md | 2 +- kedro-datasets/README.md | 2 +- kedro-datasets/kedro_datasets/ibis/file_dataset.py | 2 +- kedro-datasets/kedro_datasets/ibis/table_dataset.py | 2 +- kedro-datasets/kedro_datasets/spark/spark_streaming_dataset.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kedro-datasets/CONTRIBUTING.md b/kedro-datasets/CONTRIBUTING.md index 41454f598..8ef5ae52c 100644 --- a/kedro-datasets/CONTRIBUTING.md +++ b/kedro-datasets/CONTRIBUTING.md @@ -89,7 +89,7 @@ def count_truthy(elements: List[Any]) -> int: return sum(1 for elem in elements if elem) ``` -> *Note:* We only accept contributions under the [Apache 2.0](https://opensource.org/licenses/Apache-2.0) license, and you should have permission to share the submitted code. +> *Note:* We only accept contributions under the [Apache 2.0](https://github.com/kedro-org/kedro-plugins/blob/main/LICENSE.md) license, and you should have permission to share the submitted code. ### Branching conventions diff --git a/kedro-datasets/README.md b/kedro-datasets/README.md index aa4531e5b..d84b2bf7f 100644 --- a/kedro-datasets/README.md +++ b/kedro-datasets/README.md @@ -2,7 +2,7 @@ -[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/kedro-org/kedro-plugins/blob/main/LICENSE.md) [![Python Version](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue.svg)](https://pypi.org/project/kedro-datasets/) [![PyPI Version](https://badge.fury.io/py/kedro-datasets.svg)](https://pypi.org/project/kedro-datasets/) [![Code Style: Black](https://img.shields.io/badge/code%20style-black-black.svg)](https://github.com/ambv/black) diff --git a/kedro-datasets/kedro_datasets/ibis/file_dataset.py b/kedro-datasets/kedro_datasets/ibis/file_dataset.py index 11b58bc32..8dc98b4ad 100644 --- a/kedro-datasets/kedro_datasets/ibis/file_dataset.py +++ b/kedro-datasets/kedro_datasets/ibis/file_dataset.py @@ -157,7 +157,7 @@ def hashable(value): config = deepcopy(self._connection_config) backend_attr = config.pop("backend") if config else None - backend = getattr(ibis, backend_attr) + backend = getattr(ibis, str(backend_attr)) cls._connections[key] = backend.connect(**config) return cls._connections[key] diff --git a/kedro-datasets/kedro_datasets/ibis/table_dataset.py b/kedro-datasets/kedro_datasets/ibis/table_dataset.py index 7550e6266..a5744dd22 100644 --- a/kedro-datasets/kedro_datasets/ibis/table_dataset.py +++ b/kedro-datasets/kedro_datasets/ibis/table_dataset.py @@ -159,7 +159,7 @@ def hashable(value): config = deepcopy(self._connection_config) backend_attr = config.pop("backend") if config else None - backend = getattr(ibis, backend_attr) + backend = getattr(ibis, str(backend_attr)) cls._connections[key] = backend.connect(**config) return cls._connections[key] diff --git a/kedro-datasets/kedro_datasets/spark/spark_streaming_dataset.py b/kedro-datasets/kedro_datasets/spark/spark_streaming_dataset.py index b1effc278..294ea35cb 100644 --- a/kedro-datasets/kedro_datasets/spark/spark_streaming_dataset.py +++ b/kedro-datasets/kedro_datasets/spark/spark_streaming_dataset.py @@ -136,7 +136,7 @@ def save(self, data: DataFrame) -> None: ( output_constructor.option("checkpointLocation", checkpoint) .option("path", save_path) - .outputMode(output_mode) + .outputMode(str(output_mode)) .options(**self._save_args or {}) .start() )