diff --git a/src/jobflow/core/flow.py b/src/jobflow/core/flow.py index 168ca8fb..7d3c1899 100644 --- a/src/jobflow/core/flow.py +++ b/src/jobflow/core/flow.py @@ -617,7 +617,7 @@ def update_metadata( function_filter: Callable = None, dict_mod: bool = False, dynamic: bool = True, - callback_filter: Callable[[Flow | Job], bool] = lambda _: True, + callback_filter: Callable[[Flow | Job], bool] | None = None, ): """ Update the metadata of the Flow and/or its Jobs. @@ -681,7 +681,7 @@ def update_metadata( callback_filter=callback_filter, ) - if callback_filter(self) is False: + if callback_filter is not None and callback_filter(self) is False: return if dict_mod: diff --git a/src/jobflow/core/job.py b/src/jobflow/core/job.py index f18eea63..be630627 100644 --- a/src/jobflow/core/job.py +++ b/src/jobflow/core/job.py @@ -926,7 +926,7 @@ def update_metadata( function_filter: Callable = None, dict_mod: bool = False, dynamic: bool = True, - callback_filter: Callable[[jobflow.Flow | Job], bool] = lambda _: True, + callback_filter: Callable[[jobflow.Flow | Job], bool] | None = None, ): """ Update the metadata of the job. @@ -1006,7 +1006,7 @@ def update_metadata( ): return - if callback_filter(self) is False: + if callback_filter is not None and callback_filter(self) is False: return # if we get to here then we pass all the filters diff --git a/src/jobflow/utils/uuid.py b/src/jobflow/utils/uuid.py index f822d932..93c5ecf3 100644 --- a/src/jobflow/utils/uuid.py +++ b/src/jobflow/utils/uuid.py @@ -4,7 +4,10 @@ @deprecated( - message="The UUID system will be replace with UID that contains both UUID and ULID." + message=( + "The UUID system will be replaced with a UID that " + "contains both the UUID and ULID." + ) ) def suuid() -> str: """