[flake8-logging-format] Add auto-fix for f-string logging calls (G004) by hirehamir · Pull Request #19303 · astral-sh/ruff (original) (raw)

@MichaReiser added the fixes

Related to suggested fixes for violations

label

Jul 14, 2025

ntBre

ntBre

ntBre

@hirehamir

@hirehamir @ntBre

Co-authored-by: Brent Westbrook 36778786+ntBre@users.noreply.github.com

@hirehamir

@hirehamir

@hirehamir

@hirehamir

@ntBre ntBre changed the titlefeat: add auto-fix for f-string logging statements [flake8-logging-format] Add auto-fix for f-string logging calls (G004)

Aug 26, 2025

@hirehamir hirehamir deleted the feat/add-auto-fix-for-f-string-logging-statements-g004 branch

August 27, 2025 03:12

carljm added a commit to leandrobbraga/ruff that referenced this pull request

Aug 27, 2025

@carljm

second-ed pushed a commit to second-ed/ruff that referenced this pull request

Sep 9, 2025

…004`) (astral-sh#19303)

Closes astral-sh#19302

Summary

This adds an auto-fix for Logging statement uses f-string Ruff G004, so users don't have to resolve it manually.

Test Plan

I ran the auto-fixes on a Python file locally and and it worked as expected.


Co-authored-by: Brent Westbrook 36778786+ntBre@users.noreply.github.com

@ntBre ntBre mentioned this pull request

Sep 10, 2025

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})