◐ Shell
clean mode source ↗

don't rewrite string quotes inside f-strings by asottile · Pull Request #973 · pre-commit/pre-commit-hooks

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@asottile

@asottile asottile commented

Oct 7, 2023

edited

Loading

Copy link Copy Markdown

Member

resolves #971

jkittner reacted with heart emoji

@asottile asottile merged commit ae9b59f into main

Oct 7, 2023

@asottile asottile deleted the string-fixer-3-12 branch

October 7, 2023 17:53

espressif-bot pushed a commit to espressif/esp-idf-size that referenced this pull request

May 6, 2025
Python 3.12 and later versions support nested strings in f-strings (PEP
701) and have modified the tokenize module. However, this update was not
incorporated into the double-quote-string-fixer (string_fixer.py)
hook of pre-commit. The issue[1] is resolved[2] in pre-commit
version 4.5.0[3].  Upgrade to pre-commit 4.5.0 to prevent incorrect
reformatting of f-strings.

[1] pre-commit/pre-commit-hooks#971
[2] https://github.com/pre-commit/pre-commit-hooks/blob/main/CHANGELOG.md#450---2023-10-07
[3] pre-commit/pre-commit-hooks#973

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

1 participant

@asottile