I am trying to format my Python code automatically using the format on save feature in vs Code.
I have installed the autopep8
package and added the following configuration to my pyproject.toml
file:
[tool.autopep8]
in-place = true
aggressive = 2
when I try like autopep8 test.py
it is working. However, when I try to format my code using the format on save feature, I get the following error message:
--in-place cannot be used with standard input
How can I resolve this error and format my code using autopep8
with desired options?
and my vs code settings looks like:
// Python
"[python]": {
"editor.defaultFormatter": "ms-python.autopep8",
},
"python.formatting.provider": "none",