Skip to content

Commit 8393d14

Browse files
authored
Merge pull request #6950 from janasangeetha/sangeethajana-patch1
Fix Ruff rule B027 and B024
2 parents 50a8599 + c034df5 commit 8393d14

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

tfx/orchestration/portable/base_executor_operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@ def with_execution_watcher(
8484
self._execution_watcher_address = execution_watcher_address
8585
return self
8686

87-
def handle_stop(self) -> None:
87+
def handle_stop(self) -> None: # noqa: B027
8888
"""Executor Operator specific logic to clean up after it is stopped."""
8989
pass

tfx/tools/cli/handler/dag_runner_patcher.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
"""Base class to patch DagRunner classes in TFX CLI."""
15-
15+
#ruff: noqa: B027
1616
import abc
1717
import contextlib
1818
import functools
@@ -56,12 +56,12 @@ def __init__(self, call_real_run=True):
5656
self._run_called = False
5757
self._call_real_run = call_real_run
5858

59-
def _before_run(self, runner: tfx_runner.TfxRunner,
59+
def _before_run(self, runner: tfx_runner.TfxRunner, # noqa: B027
6060
pipeline: Union[pipeline_pb2.Pipeline, tfx_pipeline.Pipeline],
6161
context: MutableMapping[str, Any]) -> None:
6262
pass
6363

64-
def _after_run(self, runner: tfx_runner.TfxRunner,
64+
def _after_run(self, runner: tfx_runner.TfxRunner, # noqa: B027
6565
pipeline: Union[pipeline_pb2.Pipeline, tfx_pipeline.Pipeline],
6666
context: MutableMapping[str, Any]) -> None:
6767
pass

tfx/types/system_artifacts.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from ml_metadata.metadata_store import mlmd_types
2222

2323

24-
class SystemArtifact(abc.ABC):
24+
class SystemArtifact(abc.ABC): # noqa: B024
2525
"""TFX system artifact base class.
2626
2727
A user may create a subclass of SystemArtifact and override the
@@ -30,7 +30,6 @@ class SystemArtifact(abc.ABC):
3030
The subclasses, e.g, Dataset, Model, Statistics, e.t.c, match the MLMD types
3131
from third_party/ml_metadata/metadata_store/mlmd_types.py.
3232
"""
33-
3433
# MLMD system base type enum. Override it when creating subclasses.
3534
MLMD_SYSTEM_BASE_TYPE = None
3635

tfx/types/system_executions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from ml_metadata.metadata_store import mlmd_types
2222

2323

24-
class SystemExecution(abc.ABC):
24+
class SystemExecution(abc.ABC): # noqa: B024
2525
"""TFX system execution base class.
2626
2727
A user may create a subclass of SystemExecution and override the
@@ -30,7 +30,6 @@ class SystemExecution(abc.ABC):
3030
The subclasses, e.g, Train, Transform, Process, e.t.c, match the MLMD types
3131
from third_party/ml_metadata/metadata_store/mlmd_types.py.
3232
"""
33-
3433
# MLMD system base type enum. Override it when creating subclasses.
3534
MLMD_SYSTEM_BASE_TYPE = None
3635

0 commit comments

Comments
 (0)