Closed jidicula closed 3 years ago
the extra args variable seems the right place. it should be a list of strings, not a single string, though: '("-S")
My .dir-locals.el looks like this now:
(
(python-black-extra-args . '("-S"))
)
but this didn't result in the expected change, and the package's autoformatting still normalizes strings 😦.
However, when I execute (setq python-black-extra-args '("-S"))
, the autoformatting doesn't normalize strings as expected...
Never mind, I got it to work with the following .dir-locals.el 🎉
(
(python-mode . (
(python-black-extra-args . ("-S"))
)
)
)
This is a pretty nice package that has faster execution than blacken! I especially like that it's still being actively developed 😉
I'm trying to set some project-specific Black configs without using a pyproject.toml, so naturally I'd like to use .dir-locals.el. Specifically, I want to skip string normalization in some projects by running
black -S
. How can I do this with this package? I already tried settingpython-black-command
to"black -S"
in .dir-locals.el, but this didn't seem to do it. Neither did settingpython-black-extra-args
to"-S"
. The following block is my .dir-locals.el and I tried toggling each of the lines.Is this a configuration that's possible with this package, or am I misusing these variables?