hhatto / autopep8

A tool that automatically formats Python code to conform to the PEP 8 style guide.
https://pypi.org/project/autopep8/
MIT License
4.54k stars 291 forks source link

Provide a way to ignore recursive. #675

Open karthiknadig opened 1 year ago

karthiknadig commented 1 year ago

There is no way to turn off recursive when running from using standard input. This is an issue for VS Code extension trying to run autopep8 on unsaved files which have to use the stdin to format before saving.


Command Line and Configuration

.pep8, setup.cfg, ...

[tool.autopep8]
recursive = true

Command Line

python.exe -m autopep8 --max-line-length=120 -
--recursive cannot be used with standard input

Your Environment

orsinium commented 1 year ago

The same goes for if there is in-place = true in the config. The VSCode extension just doesn't do anything if either option is present in the config: no formatting and no error.