autopep8

Python AutoPep8 formatting not working with max line length parameter

Python AutoPep8 formatting not working with max line length parameter Question: I noticed one strange thing that autopep8 autoformatting in VSCode doesn’t work when we set "python.formatting.autopep8Args": [ "–line-length 119" ], But if this setting is in a default mode that is line length 79 then it works well. Is there some issue with autopep8 …

Total answers: 3

Why does VS-Code Autopep8 format 2 white lines?

Why does VS-Code Autopep8 format 2 white lines? Question: print(“Hello”) def world(): print(“Hello”) world() Gets corrected to: print(“Hello”) def world(): print(“Hello”) world() I have tried to: Reinstall Virtual Studio Code Reinstall Python 3.8 Computer Reboot Using other formatters like Black and yapf but got the same result Asked By: Jakkalsie || Source Answers: Because autopep8 …

Total answers: 3

Allow statements before imports with Visual Studio Code and autopep8

Allow statements before imports with Visual Studio Code and autopep8 Question: I’m using Visual Studio Code with the Python plugin and autopep8 with: "editor.formatOnSave": true I have local packages I need to import, so I have something like: import sys sys.path.insert(0, ‘/path/to/packages’) import localpackage but when I save, Visual Studio Code/autopep8 moves all import statements …

Total answers: 2