From 9a6d4ad38f935952351ab64a15be3a22e2466d5c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 09:58:20 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- studio/backend/routes/training.py | 1 + 1 file changed, 1 insertion(+) diff --git a/studio/backend/routes/training.py b/studio/backend/routes/training.py index 63e3c74570..d51e3f6ba4 100644 --- a/studio/backend/routes/training.py +++ b/studio/backend/routes/training.py @@ -1253,6 +1253,7 @@ _DATASET_NAME_RE = None # compiled lazily; module keeps its import block torch- def _clean_diffusion_dataset_name(name: str) -> str: """Validate a dataset folder name: a single path component, no traversal, printable.""" import re + global _DATASET_NAME_RE if _DATASET_NAME_RE is None: _DATASET_NAME_RE = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._ -]{0,127}$")