From bbb5a44a56293d6da22a54c85cb717c034a794f2 Mon Sep 17 00:00:00 2001 From: MOHIT PRASANTH KALAHASTHI <22170424+mohitprasanth@users.noreply.github.com> Date: Fri, 7 Aug 2026 23:23:35 +0530 Subject: [PATCH] style: apply ruff format to the changed lines `ruff format --check` flagged custom_logger.py and litellm_logging.py: the inserted block carried a stray blank line after the class statement, and the reworked condition had blank lines between its clauses. Formatting only -- no behaviour change. Verified with the pinned ruff==0.15.3 and the repo's ruff.toml (line-length 120); `ruff check` passes on all three files. --- litellm/integrations/custom_logger.py | 2 +- litellm/litellm_core_utils/litellm_logging.py | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/litellm/integrations/custom_logger.py b/litellm/integrations/custom_logger.py index f86dadab178..2cba74061de 100644 --- a/litellm/integrations/custom_logger.py +++ b/litellm/integrations/custom_logger.py @@ -59,12 +59,12 @@ _BASE64_INLINE_PATTERN: Final = re.compile( class CustomLogger: # https://docs.litellm.ai/docs/observability/custom_callback#callback-class - # Set True on callbacks that must still run for `no-log` requests -- # metering, billing and budget enforcement, as opposed to observability. # `no-log` means "do not send this request to logging integrations"; it is # not a way for a caller to opt out of being billed. runs_on_no_log: bool = False + # Class variables or attributes def __init__( self, diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py index af0faf9200d..4c5ef4b61f0 100644 --- a/litellm/litellm_core_utils/litellm_logging.py +++ b/litellm/litellm_core_utils/litellm_logging.py @@ -1670,19 +1670,12 @@ class Logging(LiteLLMLoggingBaseClass): # proxy cost tracking cal backs should run if not ( - isinstance(callback, CustomLogger) - and ( - callback.runs_on_no_log - # Retained for callbacks predating `runs_on_no_log`. - or "_PROXY_" in callback.__class__.__name__ - ) - ): verbose_logger.debug("no-log request, skipping logging for %s event", event_hook) return False