Ask Your Question
1

yapf indent setting

asked 2022-07-14 19:05:01 -0500

bai's avatar

updated 2022-07-15 08:39:55 -0500

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-07-15 08:39:36 -0500

It looks like we're not sending --style arguments to the command that we run for our internal formatting support, so it's always using the default 'pep8' style. How are you specifying the style in the command line you're using in OS Commands? I want to see if we can expand this so it's possible to support your use case.

edit flag offensive delete link more

Comments

I didn't use style argument, only execute "yapf" command in the project directory. I have a .style.yapf to controll the style.

I hope wing pro will recognize the style file or use style argument to use yapf better.

bai's avatar bai  ( 2022-07-21 18:38:09 -0500 )edit

Ah, I think the issue here is that we're not running yapf in the right directory. Is the .style.yapf in the same directory as the file being reformatted, or in the directory from which you start yapf?

Wingware Support's avatar Wingware Support  ( 2022-07-22 08:28:18 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2022-07-14 19:05:01 -0500

Seen: 27 times

Last updated: Jul 15