From f1acbdb7284fca21d76094d393996638dd1c083b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 22 Jun 2026 14:36:33 +0200 Subject: [PATCH] style(quickadapter): tighten tail probe docstring clause (c) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The (c) clause previously named both `ValueError` and `UnicodeDecodeError` plus their subclass relationship. The exception classes are visible at the `except ValueError` line below — keep the behavioral description in the docstring ("not parseable by json.loads (malformed JSON or invalid UTF-8)") and let the code document the catch surface. --- .../user_data/freqaimodels/QuickAdapterRegressorV3.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py b/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py index 399120f..e49e1f3 100644 --- a/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py +++ b/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py @@ -4274,11 +4274,10 @@ class QuickAdapterRegressorV3(BaseRegressionModel): Bounded tail probe (last ``_OPTUNA_JOURNAL_TAIL_PROBE_BYTES``). Return True iff the file is non-empty AND its trailing record is (a) missing the newline, (b) empty (bare ``\\n``), or - (c) ``json.loads``-unparseable (malformed JSON, ``ValueError``, - or invalid UTF-8, ``UnicodeDecodeError`` — both are - ``ValueError`` subclasses). Fail-open when the probe window - cuts a single line larger than the window; defer to the - post-construction handler. + (c) not parseable by ``json.loads`` (malformed JSON or + invalid UTF-8). Fail-open when the probe window cuts a single + line larger than the window; defer to the post-construction + handler. """ if not journal_path.exists(): return False -- 2.53.0