fix(service_logger): keep the observer check inside the basedpyright budget

bool(litellm.service_callback) passed a partially-unknown list as an argument
(+1 reportUnknownArgumentType, over the per-rule limit). A plain truthiness
test is the same check without the new diagnostic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Yashvardhan Didwania 2026-10-01 16:49:24 +05:30
parent 6b2d023d10
commit c886150d1b

View file

@ -141,7 +141,9 @@ class ServiceLogging(CustomLogger):
database queries with ``SynchronousOnlyOperation``. So skip it when there is
no service callback (or test counter) to receive the event.
"""
return bool(litellm.service_callback) or self.mock_testing
if litellm.service_callback:
return True
return self.mock_testing
@staticmethod
def _dispatch_from_sync(hook: Callable[[], Coroutine[object, object, None]]) -> None: