0

I know that you can pass "python.formatting.autopep8Args": ["--max-line-length=200"] in .vscode/settings.json to override the max 79 length for a line, are there any flags for allow multiple line imports. What I want:

import json, os, h5py, pyperclip

this is just an example, usually I'd group modules with similar function in the code. Its more of a preference thing ;).

Edit: I could always do something like

# fmt: off
import json, os, h5py, pyperclip
# fmt: on

but I want a solution that is just pure vs-code settings based, like for the max-line-length I explained above.

Kanishk
  • 258
  • 1
  • 3
  • 9

1 Answers1

1
"python.formatting.autopep8Args": ["--ignore", "E401"],

And this is the official docs, you can find how to configure it with the suitable configurations.

Steven-MSFT
  • 7,438
  • 1
  • 5
  • 13
  • comming back to this, where do you get these `Exxx` codes? I tried finding them but couldnt. using `;` in a line separates two lines in a single line, `print(1) ; print(2)`, but autopep8 automatically converts that into a new line, how do I ingnore this? – Kanishk Dec 09 '21 at 20:58
  • I'm so sorry, guess I didnt read properly. I got them. Thanks again – Kanishk Dec 10 '21 at 07:26