Skip to content

Commit

Permalink
Merge pull request #6950 from janasangeetha/sangeethajana-patch1
Browse files Browse the repository at this point in the history
Fix Ruff rule B027 and B024
  • Loading branch information
lego0901 authored Nov 15, 2024
2 parents 50a8599 + c034df5 commit 8393d14
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tfx/orchestration/portable/base_executor_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ def with_execution_watcher(
self._execution_watcher_address = execution_watcher_address
return self

def handle_stop(self) -> None:
def handle_stop(self) -> None: # noqa: B027
"""Executor Operator specific logic to clean up after it is stopped."""
pass
6 changes: 3 additions & 3 deletions tfx/tools/cli/handler/dag_runner_patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Base class to patch DagRunner classes in TFX CLI."""

#ruff: noqa: B027
import abc
import contextlib
import functools
Expand Down Expand Up @@ -56,12 +56,12 @@ def __init__(self, call_real_run=True):
self._run_called = False
self._call_real_run = call_real_run

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

def _after_run(self, runner: tfx_runner.TfxRunner,
def _after_run(self, runner: tfx_runner.TfxRunner, # noqa: B027
pipeline: Union[pipeline_pb2.Pipeline, tfx_pipeline.Pipeline],
context: MutableMapping[str, Any]) -> None:
pass
Expand Down
3 changes: 1 addition & 2 deletions tfx/types/system_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from ml_metadata.metadata_store import mlmd_types


class SystemArtifact(abc.ABC):
class SystemArtifact(abc.ABC): # noqa: B024
"""TFX system artifact base class.
A user may create a subclass of SystemArtifact and override the
Expand All @@ -30,7 +30,6 @@ class SystemArtifact(abc.ABC):
The subclasses, e.g, Dataset, Model, Statistics, e.t.c, match the MLMD types
from third_party/ml_metadata/metadata_store/mlmd_types.py.
"""

# MLMD system base type enum. Override it when creating subclasses.
MLMD_SYSTEM_BASE_TYPE = None

Expand Down
3 changes: 1 addition & 2 deletions tfx/types/system_executions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from ml_metadata.metadata_store import mlmd_types


class SystemExecution(abc.ABC):
class SystemExecution(abc.ABC): # noqa: B024
"""TFX system execution base class.
A user may create a subclass of SystemExecution and override the
Expand All @@ -30,7 +30,6 @@ class SystemExecution(abc.ABC):
The subclasses, e.g, Train, Transform, Process, e.t.c, match the MLMD types
from third_party/ml_metadata/metadata_store/mlmd_types.py.
"""

# MLMD system base type enum. Override it when creating subclasses.
MLMD_SYSTEM_BASE_TYPE = None

Expand Down

0 comments on commit 8393d14

Please sign in to comment.