Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--experimental adds spaces inside an f-string, which exceeds the max length #760

Open
daniel-afana opened this issue Jul 10, 2024 · 0 comments

Comments

@daniel-afana
Copy link


Python Code

my_variable = None
f"11111111111111111111111111111111111111111111111111111111111111111111111111111111111111{my_variable}{my_variable} "

Command Line

$ autopep8 --in-place --experimental --max-line-length=99 my_file.py

Your Environment

  • Python version: 3.12.3
  • autopep8 version: 2.3.1
  • Platform: linux (Ubuntu 20.04), macOS Sonoma

Actual result

my_variable = None
f"11111111111111111111111111111111111111111111111111111111111111111111111111111111111111{
    my_variable} {my_variable}  "

Desirable result

my_variable = None
f"11111111111111111111111111111111111111111111111111111111111111111111111111111111111111{
    my_variable}{my_variable}"

Description of the issue

The content of the string is modified. Spaces are added. What happens inside a string should not concern the code formatter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant