📝 tstring_same_prefix params contain f-strings — the t-string coverage from #3702 is never exercised (#3793)
What's wrong
Two test constants touched by #3702 ("extend f-string rules to t-strings") do not exercise t-strings at all.
1.
tests/test_visitors/test_ast/test_complexity/test_overuses/test_overused_string.py:112-131tstring_same_prefix1 = pytest.param(
"""
x = f'Hello, {pattern}'
y = f'Hello, {pattern}'
""",
marks=pytest.mark.skipif(not PY314, reason='t-strings are only in Python 3.14+'),
)
The snippet is identical to
fstring_same_prefix1 right above it. Below 3.14 the param is skipped by the mark; on 3.14+ it runs and asserts on f-strings. Either way WPS226 is never checked against a t-string, and the suite stays green.2.
tests/test_visitors/test_tokenize/test_comments/test_comment_in_formatted_string312.py:87PREFIXES is ['f', 't'] and both tests run code.format(prefix), so every constant is exercised twice. rfstring_with_comment_triple_single_quotes hardcodes rf'''…''' instead of r{0}'''…''' like its two siblings above it, so the t round re-tests rf.How it should be
1.
t'Hello, {pattern}' and t'{pattern}-postfix' inside the two tstring_same_prefix* params.2.
r{0}'''test{{a # comment\n}}''', matching rfstring_with_comment_single_quotes and rfstring_with_comment_triple_quotes.Happy to open a PR for both if that is useful.
Flake8 version and plugins / pip information / OS information
Not applicable — this is not a runtime report. Found by reading the tests, verified against HEAD
8ebc607; there is no flake8 --bug-report output to paste.Provenance
Both came out of a review run with ReviewGate (https://reviewgate.dev), a local review gate I build, over
76b3ac3~1..c580fc3. The run was local, on my own model key, and nothing left my machine.#bug #help_wanted #levelstarter #good_first_issue #wemake_python_styleguide #wps
sent via relator