wbolster / emacs-python-black

Emacs package to reformat Python using black-macchiato
BSD 3-Clause "New" or "Revised" License
95 stars 11 forks source link

Passing extra args? #6

Closed chrisalcantara closed 4 years ago

chrisalcantara commented 4 years ago

Is there a specific way to pass extra arguments? I know how edit the variable, but I'm not sure what to include. Documentation doesn't specify.

I'd like the formatter to cut lines off at 80, so I tried (setq python-black-extra-args "--line 80"), but I get a (wrong-type-argument stringp) error.

wbolster commented 4 years ago

it needs to be a list of strings, not a single string.

but i strongly recommend to not change defaults. the reason you're doing so is likely not a good reason, according to the black philosophy.

and if you absolutely must, use a config file, and leave the emacs package untouched.

wbolster commented 4 years ago

btw the variable type is self-documented since the variable is declared as a customizable list of strings. M-x customize would have shown it as such.