You can concatenate string literals like so: 'a' 'b' => 'ab'.
When F504 identifies an unused key which is defined with concatenated string literals, it fails to converge:
$ ruff concat-f504.py --no-cache --fix
debug error: Failed to converge after 100 iterations in `concat-f504.py` with rule codes F504:---
x = '' % {'a''b' : ''}
---
concat-f504.py:1:5: F504 `%`-format string has unused named argument(s): ab
Found 101 errors (100 fixed, 1 remaining).