autopep8 icon indicating copy to clipboard operation
autopep8 copied to clipboard

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

Open edgarcosta opened this issue 1 year ago • 0 comments


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: https://github.com/LMFDB/lmfdb/commit/ae5ac12892b0a7b14ab8de99d3bf27495f662332#diff-6d8d8530bb938c81789bbc90c06501eddf133bef2d233725681bbb999c2ce90dL1062-R1066

edgarcosta avatar Jul 10 '23 18:07 edgarcosta