autopep8 icon indicating copy to clipboard operation
autopep8 copied to clipboard

Indentation not fixed with range

Open chtenb opened this issue 10 years ago • 1 comments

From https://github.com/hhatto/autopep8/issues/133 and https://github.com/hhatto/autopep8/pull/134 it seems that this should be working.

Example:

$ cat sandbox/foo.py
def Hello():
  return 1

$ cat sandbox/foo.py | autopep8 - --line-range 1 3
def Hello():
  return 1

Is this intended behaviour, or should it be indented correctly?

$ autopep8 --version
autopep8 1.2.2

$ python3 --version
Python 3.5.0

chtenb avatar Apr 01 '16 07:04 chtenb

I think I disabled this on purpose. The indentation corrections were sometimes buggy with --line-range. I think this may be a duplicate of https://github.com/hhatto/autopep8/issues/175#issuecomment-87096771.

myint avatar Apr 01 '16 15:04 myint