From a8b1a8ddce96615221c8b943538697351ae4300d Mon Sep 17 00:00:00 2001 From: Martin Huschenbett Date: Thu, 14 Nov 2024 06:53:15 -0800 Subject: [PATCH] Code update PiperOrigin-RevId: 696505864 --- kauldron/checkpoints/lazy_checkpoint_manager.py | 2 +- kauldron/kontext/glob_paths.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kauldron/checkpoints/lazy_checkpoint_manager.py b/kauldron/checkpoints/lazy_checkpoint_manager.py index 3e68d2c0..5f46ae1c 100644 --- a/kauldron/checkpoints/lazy_checkpoint_manager.py +++ b/kauldron/checkpoints/lazy_checkpoint_manager.py @@ -109,7 +109,7 @@ def save( step, args=state.__kd_ocp_save_args__(), force=force, - ) + ) # pytype: disable=bad-return-type def restore(self, state: _StateT, *, step: int) -> _StateT: """Wrapper around `ocp.CheckpointManager.restore`.""" diff --git a/kauldron/kontext/glob_paths.py b/kauldron/kontext/glob_paths.py index 2087c149..36803776 100644 --- a/kauldron/kontext/glob_paths.py +++ b/kauldron/kontext/glob_paths.py @@ -233,7 +233,7 @@ def _set_in( # During glob, the object might contains branch which do not match if missing_ok and part not in wrapper: - return # Leaf not found, do not assign this branch + return # Leaf not found, do not assign this branch # pytype: disable=bad-return-type if not rest: # Nothing left to recurse on, assign the leaf. if isinstance(part, path_parser.Wildcard): @@ -251,5 +251,5 @@ def _set_in( _set_in(new_context, parts, value) # Propagate the `**` to the leaves else: # Otherwise, recurse. for _, new_context in wrapper.get_items(part): - _set_in(new_context, rest, value) + _set_in(new_context, rest, value) # pytype: disable=bad-return-type # TODO(epot): Reraise with the full path branch in which the error occured