]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
style(quickadapter): tighten tail probe docstring clause (c)
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 22 Jun 2026 12:36:33 +0000 (14:36 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 22 Jun 2026 12:36:33 +0000 (14:36 +0200)
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.

quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py

index 399120f55c57ffbe8667b5f81afd3212cf3dfff7..e49e1f321bb93ce0306bb61141cf10645ef1ab30 100644 (file)
@@ -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