From ecf340959c29bf503c40829b39583b1c30d97cf4 Mon Sep 17 00:00:00 2001 From: smokestacklightnin <125844868+smokestacklightnin@users.noreply.github.com> Date: Sat, 26 Oct 2024 19:09:18 -0700 Subject: [PATCH] Fix Ruff rule ISC linting violations --- tfx/examples/penguin/penguin_utils_cloud_tuner.py | 2 +- tfx/experimental/templates/container_based_test_case.py | 2 +- tfx/types/artifact.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tfx/examples/penguin/penguin_utils_cloud_tuner.py b/tfx/examples/penguin/penguin_utils_cloud_tuner.py index 15b02c83ed..38def78e58 100644 --- a/tfx/examples/penguin/penguin_utils_cloud_tuner.py +++ b/tfx/examples/penguin/penguin_utils_cloud_tuner.py @@ -229,7 +229,7 @@ def tuner_fn(fn_args: tfx.components.FnArgs) -> tfx.components.TunerFnResult: datetime.datetime.now().strftime('%Y%m%d%H')) if _CLOUD_FIT_IMAGE == 'gcr.io/my-project-id/cloud_fit': - raise ValueError('Build your own cloud_fit image, ' + + raise ValueError('Build your own cloud_fit image, ' 'default dummy one is used!') tuner = cloud_tuner.DistributingCloudTuner( diff --git a/tfx/experimental/templates/container_based_test_case.py b/tfx/experimental/templates/container_based_test_case.py index 6be904038b..d241d3e108 100644 --- a/tfx/experimental/templates/container_based_test_case.py +++ b/tfx/experimental/templates/container_based_test_case.py @@ -102,7 +102,7 @@ def _prepare_data(self): io_utils.copy_file( 'data/data.csv', f'gs://{self._BUCKET_NAME}/{self._DATA_DIRECTORY_NAME}/' - + f'{self._pipeline_name}/data.csv') + f'{self._pipeline_name}/data.csv') @retry.retry(ignore_eventual_failure=True) def _delete_pipeline_data(self): diff --git a/tfx/types/artifact.py b/tfx/types/artifact.py index df626d231f..40fedfdd7f 100644 --- a/tfx/types/artifact.py +++ b/tfx/types/artifact.py @@ -247,7 +247,7 @@ def _get_artifact_type(cls): if type_annotation_cls: if not issubclass(type_annotation_cls, SystemArtifact): raise ValueError( - '%s''s TYPE_ANNOTATION %s is not a subclass of SystemArtifact.' % + '%ss TYPE_ANNOTATION %s is not a subclass of SystemArtifact.' % (cls, type_annotation_cls)) if type_annotation_cls.MLMD_SYSTEM_BASE_TYPE: artifact_type.base_type = type_annotation_cls.MLMD_SYSTEM_BASE_TYPE