From afc84773dca64506acdc946abdadc516ad7063b8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 20:30:33 +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 | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/studio/backend/core/inference/tools.py b/studio/backend/core/inference/tools.py index 3fb30277f3..89a29fa554 100644 --- a/studio/backend/core/inference/tools.py +++ b/studio/backend/core/inference/tools.py @@ -304,7 +304,17 @@ _SQLITE_DOTFILE_RE = re.compile( # sqlite3 CLI options that consume a SEPARATED operand (so the value after them is NOT the # database filename). Only -init also reads a file (its value is path-checked at the call site). _SQLITE_OPERAND_OPTS = frozenset( - {"-init", "-cmd", "-mode", "-separator", "-newline", "-nullvalue", "-lookaside", "-mmap", "-maxsize"} + { + "-init", + "-cmd", + "-mode", + "-separator", + "-newline", + "-nullvalue", + "-lookaside", + "-mmap", + "-maxsize", + } ) @@ -2004,9 +2014,8 @@ def _find_blocked_commands(command: str) -> set[str]: elif _cw in _XARGS_INTERP: for _ci2 in range(_cwidx + 1, len(_xseg)): _ct2 = _xseg[_ci2].lower() - _is_code_flag = ( - _ct2 in ("-c", "-e", "--eval") - or (_ct2.startswith("-") and not _ct2.startswith("--") and _ct2.endswith("c")) + _is_code_flag = _ct2 in ("-c", "-e", "--eval") or ( + _ct2.startswith("-") and not _ct2.startswith("--") and _ct2.endswith("c") ) if _is_code_flag and _ci2 + 1 < len(_xseg) and _repl in _xseg[_ci2 + 1]: blocked.add("xargs-replace-exec") # stdin flows into interpreter code