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

"for<space><space>" gets changed to "f<space>or<space>" #688

Closed
edgarcosta opened this issue Jul 10, 2023 · 1 comment · Fixed by #748
Closed

"for<space><space>" gets changed to "f<space>or<space>" #688

edgarcosta opened this issue Jul 10, 2023 · 1 comment · Fixed by #748
Assignees
Labels

Comments

@edgarcosta
Copy link

edgarcosta commented Jul 10, 2023


Python Code

cm_opts = ([1] +
           [d for  d in [3,4]])

Command Line

$ autopep8 --diff --recursive --aggressive --select E27,W504 foo.py

--- original/foo.py
+++ fixed/foo.py
@@ -1,2 +1,2 @@
-cm_opts = ([1] +
-           [d for  d in [3,4]])
+cm_opts = ([1]
+           + [d f or d in [3,4]])

Your Environment

  • Python version: 3.11.2
  • autopep8 version: autopep8 2.0.2
  • pycodestyle: 2.10.0
  • Platform: linux and macOSX

I originally observed this here:
LMFDB/lmfdb@ae5ac12#diff-6d8d8530bb938c81789bbc90c06501eddf133bef2d233725681bbb999c2ce90dL1062-R1066

@edgarcosta edgarcosta changed the title "for " gets changed to "f or " "for<space><space>" gets changed to "f<space>or<space>" Jul 10, 2023
@hhatto hhatto self-assigned this May 28, 2024
@hhatto hhatto added the bug label May 28, 2024
@hhatto
Copy link
Owner

hhatto commented May 30, 2024

fixed in v2.2.0

https://pypi.org/project/autopep8/2.2.0/

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

Successfully merging a pull request may close this issue.

2 participants