Skip to content

Conversation

@dylwil3
Copy link
Collaborator

@dylwil3 dylwil3 commented Aug 22, 2025

Adds a method to TStringValue to detect whether the t-string is empty as an iterable. Note the subtlety here that, unlike f-strings, an empty t-string is still truthy (i.e. bool(t"")==True).

Closes #19951

@dylwil3 dylwil3 added the rule Implementing or modifying a lint rule label Aug 22, 2025
@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@dylwil3 dylwil3 merged commit 0b6ce1c into astral-sh:main Aug 22, 2025
36 checks passed
second-ed pushed a commit to second-ed/ruff that referenced this pull request Sep 9, 2025
…-deque-call` (`RUF037`) (astral-sh#20045)

Adds a method to `TStringValue` to detect whether the t-string is empty
_as an iterable_. Note the subtlety here that, unlike f-strings, an
empty t-string is still truthy (i.e. `bool(t"")==True`).

Closes astral-sh#19951
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RUF037 does not support t-strings

1 participant