---
source: crates/ruff_linter/src/rules/flake8_gettext/mod.rs
---
INT001 f-string is resolved before function call; consider `_("string %s") % arg`
 --> INT001.py:1:3
  |
1 | _(f"{'value'}")
  |   ^^^^^^^^^^^^
2 |
3 | # Don't trigger for t-strings
  |

INT001 f-string is resolved before function call; consider `_("string %s") % arg`
 --> INT001.py:6:9
  |
4 | _(t"{'value'}")
5 |
6 | gettext(f"{'value'}")
  |         ^^^^^^^^^^^^
7 | ngettext(f"{'value'}", f"{'values'}", 2)
  |

INT001 f-string is resolved before function call; consider `_("string %s") % arg`
 --> INT001.py:7:10
  |
6 | gettext(f"{'value'}")
7 | ngettext(f"{'value'}", f"{'values'}", 2)
  |          ^^^^^^^^^^^^
8 |
9 | _gettext(f"{'value'}")  # no lint
  |

INT001 f-string is resolved before function call; consider `_("string %s") % arg`
  --> INT001.py:31:14
   |
29 | def _(message): return message
30 |
31 | animals = [_(f"{'mollusk'}"),
   |              ^^^^^^^^^^^^^^
32 |            _(f"{'albatross'}"),
33 |            _(f"{'rat'}"),
   |

INT001 f-string is resolved before function call; consider `_("string %s") % arg`
  --> INT001.py:32:14
   |
31 | animals = [_(f"{'mollusk'}"),
32 |            _(f"{'albatross'}"),
   |              ^^^^^^^^^^^^^^^^
33 |            _(f"{'rat'}"),
34 |            _(f"{'penguin'}"),
   |

INT001 f-string is resolved before function call; consider `_("string %s") % arg`
  --> INT001.py:33:14
   |
31 | animals = [_(f"{'mollusk'}"),
32 |            _(f"{'albatross'}"),
33 |            _(f"{'rat'}"),
   |              ^^^^^^^^^^
34 |            _(f"{'penguin'}"),
35 |            _(f"{'python'}"),]
   |

INT001 f-string is resolved before function call; consider `_("string %s") % arg`
  --> INT001.py:34:14
   |
32 |            _(f"{'albatross'}"),
33 |            _(f"{'rat'}"),
34 |            _(f"{'penguin'}"),
   |              ^^^^^^^^^^^^^^
35 |            _(f"{'python'}"),]
   |

INT001 f-string is resolved before function call; consider `_("string %s") % arg`
  --> INT001.py:35:14
   |
33 |            _(f"{'rat'}"),
34 |            _(f"{'penguin'}"),
35 |            _(f"{'python'}"),]
   |              ^^^^^^^^^^^^^
36 |
37 | del _
   |

INT001 f-string is resolved before function call; consider `_("string %s") % arg`
  --> INT001.py:41:13
   |
39 | for a in animals:
40 |     print(_(a))
41 |     print(_(f"{a}"))
   |             ^^^^^^
   |
