From fc98fb21466e22ad3e47bdb1f4010424c0084c20 Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Mon, 5 Oct 2026 06:49:55 -0700 Subject: [PATCH] Replace `# pytype: disable` suppressions with `# pyrefly: ignore` PiperOrigin-RevId: 993655328 --- morph_net/framework/generic_regularizers.py | 4 ++-- morph_net/tools/structure_exporter.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/morph_net/framework/generic_regularizers.py b/morph_net/framework/generic_regularizers.py index 5d7d251..e07c24b 100644 --- a/morph_net/framework/generic_regularizers.py +++ b/morph_net/framework/generic_regularizers.py @@ -21,7 +21,7 @@ import abc -class NetworkRegularizer(object): # pytype: disable=ignored-metaclass +class NetworkRegularizer(object): """An interface for Network Regularizers.""" __metaclass__ = abc.ABCMeta @@ -73,7 +73,7 @@ def cost_name(self): return '' -class OpRegularizer(object): # pytype: disable=ignored-metaclass +class OpRegularizer(object): """An interface for Op Regularizers. An OpRegularizer object corresponds to a tf.Operation, and provides diff --git a/morph_net/tools/structure_exporter.py b/morph_net/tools/structure_exporter.py index cca1745..d9d6b1a 100644 --- a/morph_net/tools/structure_exporter.py +++ b/morph_net/tools/structure_exporter.py @@ -122,7 +122,7 @@ def save_alive_counts(self, f: IO[bytes]) -> None: Args: f: a file object where alive counts are saved. """ - f.write(format_structure(self.get_alive_counts())) # pytype: disable=wrong-arg-types + f.write(format_structure(self.get_alive_counts())) # pyrefly: ignore[no-matching-overload] def create_file_and_save_alive_counts(self, base_dir: Text, global_step: int) -> None: @@ -144,7 +144,7 @@ def create_file_and_save_alive_counts(self, base_dir: Text, # Probably already exists. If not, we'll see the error in the next line. pass with tf.gfile.Open(os.path.join(directory, current_filename), 'w') as f: - self.save_alive_counts(f) # pytype: disable=wrong-arg-types + self.save_alive_counts(f) # TODO(p1): maybe check that we still end up with unique names after prefix