From 47dd8fd277dfbb69554dec0c13d6945318c70c95 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 9 Jul 2026 14:39:49 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- studio/backend/core/inference/tools.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/studio/backend/core/inference/tools.py b/studio/backend/core/inference/tools.py index 10aaf1eba9..6294f35eb8 100644 --- a/studio/backend/core/inference/tools.py +++ b/studio/backend/core/inference/tools.py @@ -1933,7 +1933,11 @@ def _fold_call(node, _state, _depth): # integer size before constructing it so static analysis of e.g. # bytes(2_000_000_000) cannot OOM the Studio process (the child # sandbox rlimits never get a chance to help during analysis). - if isinstance(args[0], int) and not isinstance(args[0], bool) and args[0] > _FOLD_MAXLEN: + if ( + isinstance(args[0], int) + and not isinstance(args[0], bool) + and args[0] > _FOLD_MAXLEN + ): return None return _fold_cap(fn(*args)) except Exception: @@ -2105,7 +2109,9 @@ _CODE_DESERIALIZE_SINKS = frozenset( ) # Modules whose load/loads/decode entry points run a pickle reduce payload; used to # resolve `import pickle as p; p.loads(x)` and `from pickle import loads as l`. -_DESERIALIZE_MODULES = frozenset({"pickle", "marshal", "dill", "cloudpickle", "_pickle", "jsonpickle"}) +_DESERIALIZE_MODULES = frozenset( + {"pickle", "marshal", "dill", "cloudpickle", "_pickle", "jsonpickle"} +) # Attribute names of pure decode/decompress primitives used to hide a payload. _DECODE_ATTRS = frozenset( {