yapf indent setting
I use wingpro yapf to format files, but the indent of yapf is always 4 spaces.
My project folder has a yapf config file and I must use 2 spaces indent setting, I try to use yapf in the command line, it works well. So I use os command named yapf to finish the job, but I hope interal yapf support can read the config file and use indent correctly.
I use wing pro v7. I am not sure if v8 fix the problem.
Comments
I have a similar problem (want to use tabs vs spaces) and as mentioned in comments, it might be enough to know where the yapf command is run from since for my needs I don't want to put config file in each folder of my project rather I am using the pyproject.toml file which "pyproject.toml located in the working directory from which YAPF is invoked." Placing this file in the project root directory doesn't seem to work.
Indeed, unfortunately according to the docs yapf looks up the directory tree in a sensible way for .style.yapf but does not do that for pyproject.toml. That's an unfortunate design and so indeed the fix going into Wing 9.0.0.2 isn't going to address this use case. We'll need to add an option to control invocation directory. I'll post again here when that is done.
Wing Pro 9.0.0.6 will have the ability to set the directory where reformatters are run, both in Project Properties and Preferences. Should be out in a few days.