From b70e83b6e0b93ec4a196eaaef432ce59c32af6d2 Mon Sep 17 00:00:00 2001 From: Chris Bachhuber Date: Thu, 18 Dec 2025 20:53:02 +0100 Subject: [PATCH] Update logging to use logger instead of logging to satisfy LOG015 Currently, the proposed fix violates https://docs.astral.sh/ruff/rules/root-logger-call/. Thus, let's change to proposal to make it happy as well. --- crates/ruff_linter/src/rules/flake8_print/rules/print_call.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ruff_linter/src/rules/flake8_print/rules/print_call.rs b/crates/ruff_linter/src/rules/flake8_print/rules/print_call.rs index 82db18a2fc8fc..0c6d023fa4d8c 100644 --- a/crates/ruff_linter/src/rules/flake8_print/rules/print_call.rs +++ b/crates/ruff_linter/src/rules/flake8_print/rules/print_call.rs @@ -37,10 +37,11 @@ use crate::{Fix, FixAvailability, Violation}; /// import logging /// /// logging.basicConfig(level=logging.INFO) +/// logger = logging.getLogger(__name__) /// /// /// def sum_less_than_four(a, b): -/// logging.debug("Calling sum_less_than_four") +/// logger.debug("Calling sum_less_than_four") /// return a + b < 4 /// ``` ///