GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — don't rewrite string quotes inside f-strings by asottile · Pull Request #973 · pre-commit/pre-commit-hooks

Conversation

@asottile

@asottile asottile commented Oct 7, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

resolves #971

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jkittner reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@asottile
don't rewrite string quotes inside f-strings
f27ee31
@asottile
asottile merged commit ae9b59f into main Oct 7, 2023
@asottile
asottile deleted the string-fixer-3-12 branch October 7, 2023 17:53
@iFurySt iFurySt mentioned this pull request Apr 15, 2024
feat: support controlling agent task state. OpenHands/OpenHands#1094
Merged
@SachiaLanlus SachiaLanlus mentioned this pull request Apr 22, 2024
Add argument to skip formatting in f-string with double-string-fixer #1045
Closed
espressif-bot pushed a commit to espressif/esp-idf-size that referenced this pull request May 6, 2025
@fhrbata
change: bump pre-commit to 4.5.0
58dd9f3
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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

double-string-fixer will introduce syntax errors for nested f-strings for Python pre-3.12 versions when pre-commit is run by Python 3.12

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@asottile
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.