autopep8 is destroying my code everytime I save it #17245
Labels
bug 🐛
not-this-repo
For any issues that are not for this repository
requires triaging
maintainers need to do initial inspection of issue
Problem Description
When I use "ctrl" + "s", to save my code autopep8 is rearranging my code and adding a comment in an import statement. The import statement that gets broken up with comment is always the third import statement. Which effectively means I can't save my code in running order, because autopep8 keeps breaking it. I know it is autopep8 that is causing it, because when I turn off autopep8 it stops happening. This is pretty frustrating because my code is both useless and I can't structure it the way I want to.
I should also mention I have not adding anything to my setting.json file in regards to autopep8. The only thing I have added to my settings.json file is:
"flake8.args": ["--max-line-length","160"],
Since the last attempt I made to get help with this issue flagged my issue as "not-this-repo". I should clarify that I am posting my code show the effects of the bug with in autopep8. I am not looking for help with the code itself. But I am looking for help with the bug that autopep8 has where it rearranges the code and destroys the code after saving the document. When it auto-formats the code, it SHOULD NOT be adding in comments into import statements.
Before autopep8
After autopep8
My Set Up
VS Code: 1.95.3
autopep8: 2.3.1
Flake8: 7.1.1
tomli: 2.2.1
mccabe: 0.7.0
pycodestyle: 2.12.1
pyflakes: 3.2.0
The text was updated successfully, but these errors were encountered: