From bc01e000ad030a272710810f2f0878bd36d947e9 Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Fri, 13 Mar 2026 12:41:32 -0700 Subject: [PATCH] Cleans up the comment, which wasn't quite right --- src/paperless_text/signals.py | 10 ++++++---- src/paperless_tika/signals.py | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/paperless_text/signals.py b/src/paperless_text/signals.py index cf74d1c0e..bfdabc601 100644 --- a/src/paperless_text/signals.py +++ b/src/paperless_text/signals.py @@ -1,10 +1,12 @@ def get_parser(*args, **kwargs): from paperless.parsers.text import TextDocumentParser - # The new TextDocumentParser does not accept the legacy logging_group / - # progress_callback kwargs injected by the old signal-based consumer. - # These are dropped here; Phase 4 will replace this signal path with the - # new ParserRegistry so the shim can be removed at that point. + # TextDocumentParser accepts logging_group for constructor compatibility but + # does not store or use it (no legacy DocumentParser base class). + # progress_callback is also not used. Both may arrive as a positional arg + # (consumer) or a keyword arg (views); *args absorbs the positional form, + # kwargs.pop handles the keyword form. Phase 4 will replace this signal + # path with the new ParserRegistry so the shim can be removed at that point. kwargs.pop("logging_group", None) kwargs.pop("progress_callback", None) return TextDocumentParser() diff --git a/src/paperless_tika/signals.py b/src/paperless_tika/signals.py index 412b80bb7..f1fd17ef6 100644 --- a/src/paperless_tika/signals.py +++ b/src/paperless_tika/signals.py @@ -1,10 +1,12 @@ def get_parser(*args, **kwargs): from paperless.parsers.tika import TikaDocumentParser - # The new TikaDocumentParser does not accept the legacy logging_group / - # progress_callback kwargs injected by the old signal-based consumer. - # These are dropped here; Phase 4 will replace this signal path with the - # new ParserRegistry so the shim can be removed at that point. + # TikaDocumentParser accepts logging_group for constructor compatibility but + # does not store or use it (no legacy DocumentParser base class). + # progress_callback is also not used. Both may arrive as a positional arg + # (consumer) or a keyword arg (views); *args absorbs the positional form, + # kwargs.pop handles the keyword form. Phase 4 will replace this signal + # path with the new ParserRegistry so the shim can be removed at that point. kwargs.pop("logging_group", None) kwargs.pop("progress_callback", None) return TikaDocumentParser()