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

Hangs when line just contains backslash inbetween two empty line #669

Closed
EYH0602 opened this issue Jan 15, 2023 · 1 comment
Closed

Hangs when line just contains backslash inbetween two empty line #669

EYH0602 opened this issue Jan 15, 2023 · 1 comment

Comments

@EYH0602
Copy link

EYH0602 commented Jan 15, 2023


Python Code

# in file breaks_autopep.py
import sys

\

def f():
    pass

Command Line and Configuration

default

[pep8]

Command Line

$ autopep8 -v --in-place --aggressive breaks_autopep.py
[file:try.py]
--->  Applying global fix for E231
--->  Applying global fix for E721
--->  Applying global fix for W690
--->  3 issue(s) to fix {'E302': {6}, 'E122': {6}, 'W292': {7}}
--->  2 issue(s) to fix {'E302': {7}, 'E122': {7}}
--->  2 issue(s) to fix {'E302': {8}, 'E122': {8}}
--->  2 issue(s) to fix {'E302': {9}, 'E122': {9}}
--->  2 issue(s) to fix {'E302': {10}, 'E122': {10}}
--->  2 issue(s) to fix {'E302': {11}, 'E122': {11}}
--->  2 issue(s) to fix {'E302': {12}, 'E122': {12}}
--->  2 issue(s) to fix {'E302': {13}, 'E122': {13}}
--->  2 issue(s) to fix {'E302': {14}, 'E122': {14}}
--->  2 issue(s) to fix {'E302': {15}, 'E122': {15}}
--->  2 issue(s) to fix {'E302': {16}, 'E122': {16}}
--->  2 issue(s) to fix {'E302': {17}, 'E122': {17}}
--->  2 issue(s) to fix {'E302': {18}, 'E122': {18}}
--->  2 issue(s) to fix {'E302': {19}, 'E122': {19}}
--->  2 issue(s) to fix {'E302': {20}, 'E122': {20}}
--->  2 issue(s) to fix {'E302': {21}, 'E122': {21}}
--->  2 issue(s) to fix {'E302': {22}, 'E122': {22}}
--->  2 issue(s) to fix {'E302': {23}, 'E122': {23}}
--->  2 issue(s) to fix {'E302': {24}, 'E122': {24}}
--->  2 issue(s) to fix {'E302': {25}, 'E122': {25}}
--->  2 issue(s) to fix {'E302': {26}, 'E122': {26}}
--->  2 issue(s) to fix {'E302': {27}, 'E122': {27}}
--->  2 issue(s) to fix {'E302': {28}, 'E122': {28}}
--->  2 issue(s) to fix {'E302': {29}, 'E122': {29}}
--->  2 issue(s) to fix {'E302': {30}, 'E122': {30}}
--->  2 issue(s) to fix {'E302': {31}, 'E122': {31}}
--->  2 issue(s) to fix {'E302': {32}, 'E122': {32}}
--->  2 issue(s) to fix {'E302': {33}, 'E122': {33}}
--->  2 issue(s) to fix {'E302': {34}, 'E122': {34}}
--->  2 issue(s) to fix {'E302': {35}, 'E122': {35}}
--->  2 issue(s) to fix {'E302': {36}, 'E122': {36}}
--->  2 issue(s) to fix {'E302': {37}, 'E122': {37}}
--->  2 issue(s) to fix {'E302': {38}, 'E122': {38}}
... 

Also found at

import autopep8
f = open("breaks_autopep.py").read()
autopep8.fix_code(f)

Your Environment

  • Python version: 3.8.0
  • autopep8 version: 2.0.1
  • Platform: linux

#540

@EYH0602
Copy link
Author

EYH0602 commented May 24, 2023

should be fixed by python/cpython#90432

@EYH0602 EYH0602 closed this as completed May 24, 2023
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