[flake8-logging-format] Add auto-fix for f-string logging calls (G004) by hirehamir · Pull Request #19303 · astral-sh/ruff (original) (raw)
added the fixes
Related to suggested fixes for violations
label
Co-authored-by: Brent Westbrook 36778786+ntBre@users.noreply.github.com
ntBre changed the title
feat: add auto-fix for f-string logging statements [flake8-logging-format] Add auto-fix for f-string logging calls (G004)
hirehamir deleted the feat/add-auto-fix-for-f-string-logging-statements-g004 branch
carljm added a commit to leandrobbraga/ruff that referenced this pull request
- main:
[
ruff] Preserve relative whitespace in multi-line expressions (RUF033) (astral-sh#19647) [ty] Optimize TDD atom ordering (astral-sh#20098) [airflow] ExtendAIR311andAIR312rules (astral-sh#20082) [ty] Preserve qualifiers when accessing attributes on unions/intersections (astral-sh#20114) [ty] Fix the inferred interface of specialized generic protocols (astral-sh#19866) [ty] Infer slightly more precise types for comprehensions (astral-sh#20111) [ty] Add more tests for protocols (astral-sh#20095) [ty] don't eagerly unpack aliases in user-authored unions (astral-sh#20055) [flake8-use-pathlib] Update links to the table showing the correspondence betweenosandpathlib(astral-sh#20103) [flake8-use-pathlib] MakePTH100fix unsafe because it can change behavior (astral-sh#20100) [flake8-use-pathlib] Delete unusedRule::OsSymlinkenabled check (astral-sh#20099) [ty] Add search paths info to unresolved import diagnostics (astral-sh#20040) [flake8-logging-format] Add auto-fix for f-string logging calls (G004) (astral-sh#19303) Add aScopeKindfor the__class__cell (astral-sh#20048) Fix incorrect D413 links in docstrings convention FAQ (astral-sh#20089) [ty] Refactor inlay hints structure to use separate parts (astral-sh#20052)
second-ed pushed a commit to second-ed/ruff that referenced this pull request
…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 mentioned this pull request
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 }})