ruff/crates/ruff_linter/resources/test/fixtures
Gary Yendell 44fc87f491
[ruff] Add logging-eager-conversion (RUF065) (#19942)
<!--
Thank you for contributing to Ruff/ty! To help us out with reviewing,
please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title? (Please prefix
with `[ty]` for ty pull
  requests.)
- Does this pull request include references to any relevant issues?
-->

## Summary

Fixes #12734

I have started with simply checking if any arguments that are providing
extra values to the log message are calls to `str` or `repr`, as
suggested in the linked issue. There was a concern that this could cause
false positives and the check should be more explicit. I am happy to
look into that if I have some further examples to work with.

If this is the accepted solution then there are more cases to add to the
test and it should possibly also do test for the same behavior via the
`extra` keyword.

<!-- What's the purpose of the change? What does it do, and why? -->

## Test Plan

I have added a new test case and python file to flake8_logging_format
with examples of this anti-pattern.

<!-- How was it tested? -->
2025-09-19 16:43:44 -04:00
..
airflow [airflow] Move airflow.operators.postgres_operator.Mapping from AIR302 to AIR301 (#20172) 2025-09-03 10:18:17 -04:00
control-flow-graph [pylint] Fix unreachable infinite loop (PLW0101) (#15278) 2025-01-08 09:45:04 -06:00
eradicate Don't flag pyrefly pragmas as unused code (ERA001) (#19731) 2025-08-04 10:15:37 +02:00
fastapi [fastapi] Fix false positive for paths with spaces around parameters (FAST003) (#20077) 2025-08-29 13:40:25 +00:00
filesystem
flake8_2020
flake8_annotations [ruff 0.8] [flake8-annotations] Remove deprecated rules ANN101 and ANN102 (#14384) 2024-11-20 13:11:51 +01:00
flake8_async [flake8-async] Implement blocking-input rule (ASYNC250) (#20122) 2025-08-28 11:04:24 -07:00
flake8_bandit [flake8-bandit] Fix truthiness: dict-only ** displays not truthy for shell (S602, S604, S609) (#20177) 2025-09-10 17:06:33 -04:00
flake8_blind_except [flake8-blind-except] Fix BLE001 false-positive on raise ... from None (#19755) 2025-08-13 13:01:47 -04:00
flake8_boolean_trap FBT001: exclude boolean operators (#14203) 2024-11-10 22:40:37 +00:00
flake8_bugbear [ruff] Fix B004 to skip invalid hasattr/getattr calls (#20486) 2025-09-19 13:44:42 -05:00
flake8_builtins [flake8-builtins] Ignore variables matching module attribute names (A001) (#16454) 2025-03-03 11:10:23 +01:00
flake8_commas Track t-strings and f-strings for token-based rules and suppression comments (#20357) 2025-09-12 13:00:12 -05:00
flake8_comprehensions [flake8-comprehensions] Preserve trailing commas for single-element lists (C409) (#19571) 2025-09-19 09:27:14 -04:00
flake8_datetimez [flake8-datetime] Ignore .replace() calls while looking for .astimezone (#16050) 2025-02-09 15:48:59 +00:00
flake8_debugger [flake8-debugger] Also flag sys.breakpointhook and sys.__breakpointhook__ (T100) (#16191) 2025-02-16 14:50:16 -05:00
flake8_django [flake8_django] Fix DJ008 false positive for abstract models with type-annotated abstract field (#19221) 2025-07-11 16:50:59 +00:00
flake8_errmsg [flake8-errmsg] Exclude typing.cast from EM101 (#19656) 2025-08-01 13:37:44 -04:00
flake8_executable [flake8-executable] Allow uvx in shebang line (EXE003) (#18967) 2025-06-30 09:38:18 -04:00
flake8_fixme Fix TODO directive out of bounds acccess (#13756) 2024-10-15 10:49:53 +02:00
flake8_future_annotations Avoid flagging __future__ annotations as required for non-evaluated type annotations (#11414) 2024-05-21 18:57:13 +00:00
flake8_gettext Add t-string fixtures for rules that do not need to be modified (#19146) 2025-07-14 09:46:31 -05:00
flake8_implicit_str_concat Track t-strings and f-strings for token-based rules and suppression comments (#20357) 2025-09-12 13:00:12 -05:00
flake8_import_conventions [flake8-import-conventions] Add import numpy.typing as npt to default flake8-import-conventions.aliases (#17133) 2025-04-02 09:25:46 +02:00
flake8_logging [flake8-logging] Avoid false positive for exc_info=True outside logger.exception (LOG014) (#18737) 2025-06-20 14:43:08 -04:00
flake8_logging_format [flake8-logging-format] Add auto-fix for f-string logging calls (G004) (#19303) 2025-08-26 10:51:24 -04:00
flake8_no_pep420 Skip namespace package enforcement for PEP 723 scripts (#13974) 2024-10-29 02:11:31 +00:00
flake8_pie Fix F701 to F707 errors in tests (#19125) 2025-07-04 13:43:18 -05:00
flake8_print
flake8_pyi [flake8-pyi] Preserve inline comment in ellipsis removal (PYI013) (#19399) 2025-07-29 15:06:04 -04:00
flake8_pytest_style Less confidently mark f-strings as empty when inferring truthiness (#20152) 2025-08-29 22:12:54 +00:00
flake8_quotes Implement template strings (#17851) 2025-05-30 15:00:56 -05:00
flake8_raise [flake8-raise] Make fix unsafe if it deletes comments (RSE102) (#18788) 2025-06-21 19:09:40 +02:00
flake8_return [flake8-return] Fix false-positive for variables used inside nested functions in RET504 (#18433) 2025-07-10 16:10:22 -04:00
flake8_self [flake8-self] Ignore attribute accesses on instance-like variables (SLF001) (#16149) 2025-02-23 10:00:49 +00:00
flake8_simplify [flake8-simplify] Fix incorrect fix for positive maxsplit without separator (SIM905) (#20056) 2025-09-18 20:56:34 +00:00
flake8_slots Avoid recommending __slots__ for classes that inherit from more than namedtuple (#12531) 2024-07-26 14:24:40 +00:00
flake8_tidy_imports
flake8_todos [flake8-todos] Allow VSCode GitHub PR extension style links in missing-todo-link (TD003) (#15519) 2025-01-15 23:47:33 +00:00
flake8_type_checking [flake8-type-checking, pyupgrade, ruff] Add from __future__ import annotations when it would allow new fixes (TC001, TC002, TC003, UP037, RUF013) (#19100) 2025-07-16 08:50:52 -04:00
flake8_unused_arguments Add t-string fixtures for rules that do not need to be modified (#19146) 2025-07-14 09:46:31 -05:00
flake8_use_pathlib [flake8-use-pathlib] Fix PTH101, PTH104, PTH105, PTH121 fixes (#20143) 2025-09-18 14:17:54 +00:00
flynt [flynt] Use triple quotes for joined raw strings with newlines (FLY002) (#20197) 2025-09-18 13:18:29 -04:00
isort [isort] Handle multiple continuation lines after module docstring (I002) (#19818) 2025-08-15 17:17:50 -04:00
mccabe
numpy Ignore NPY201 inside except blocks for compatibility with older numpy versions (#12490) 2024-07-24 20:03:23 +00:00
pandas_vet Limit inplace diagnostics to methods that accept inplace (#9495) 2024-01-12 14:12:54 -05:00
pep8_naming [pep8-naming] Fix N802 false positives for CGIHTTPRequestHandler and SimpleHTTPRequestHandler (#19432) 2025-07-23 12:04:11 -04:00
perflint [perflint] Handle tuples in dictionary comprehensions (PERF403) (#19934) 2025-08-28 21:37:40 +00:00
pycodestyle [pycodestyle] Fix E301 to only trigger for functions immediately within a class (#19768) 2025-09-16 11:00:07 -04:00
pydoclint Fix typos found by codespell (#14863) 2024-12-09 09:32:12 +00:00
pydocstyle [pydoclint] Fix SyntaxError from fixes with line continuations (D201, D202) (#19246) 2025-07-14 13:31:36 -04:00
pyflakes [pyflakes] Fix allowed-unused-imports matching for top-level modules (F401) (#20115) 2025-08-28 13:02:50 +00:00
pygrep_hooks [pygrep_hooks] Add AsyncMock methods to invalid-mock-access (PGH005) (#18547) 2025-06-24 17:27:21 -04:00
pylint [pylint] Add U+061C to PLE2502 (#20106) 2025-08-28 16:35:48 -04:00
pyupgrade [pyupgrade] Fix false positive when class name is shadowed by local variable (UP008) (#20427) 2025-09-18 14:05:05 +00:00
refurb [refurb] Mark single-item-membership-test fix as always unsafe (FURB171) (#20279) 2025-09-18 15:24:15 +00:00
ruff [ruff] Add logging-eager-conversion (RUF065) (#19942) 2025-09-19 16:43:44 -04:00
syntax_errors [syntax-errors] Detect yield from inside async function (#20051) 2025-09-03 10:13:05 -04:00
tryceratops Recode TRY302 to TRY203 (#13502) 2024-10-17 16:35:12 +01:00
__init__.py [pylint] (Re-)Implement import-private-name (C2701) (#9553) 2024-01-16 14:03:11 -05:00