From 0bafb37a4b2a766b9d94ad96a20f708621213b64 Mon Sep 17 00:00:00 2001 From: Patrick Hoefler <61934744+phofl@users.noreply.github.com> Date: Fri, 27 Oct 2023 00:12:36 +0200 Subject: [PATCH] Remove ops that are not in parameters from tokenize_partial --- dask_expr/_util.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dask_expr/_util.py b/dask_expr/_util.py index 4a415e3df..ba390fcb5 100644 --- a/dask_expr/_util.py +++ b/dask_expr/_util.py @@ -57,13 +57,13 @@ def _tokenize_partial(expr, ignore: list | None = None) -> str: # Helper function to "tokenize" the operands # that are not in the `ignore` list ignore = ignore or [] - return _tokenize_deterministic( - *[ - op - for i, op in enumerate(expr.operands) - if i >= len(expr._parameters) or expr._parameters[i] not in ignore - ] - ) + ops = [] + for i, op in enumerate(expr.operands): + if i >= len(expr._parameters): + continue + elif expr._parameters[i] not in ignore: + ops.append(op) + return _tokenize_deterministic(*ops) class LRU(UserDict[K, V]):