First time here? Check out the FAQ!
1

Reformatting all files in a project

Could this be provided as a convenience function? I'm using black, and sometimes I receive projects with horrible formatting. Because Wing knows which sources belong to the project, an internal solution is often preferable compared to some script, rewriting anything in his scope. At this moment I'm not sure if the Wing API provides the relevant information, but the particular function has IMO enough value to justify a standard interface in the main application.

This should certainly only be available as mostly one-time deliberate manual step for initial formatting, though. Perhaps with some confirmation dialog or a non-standard command to be explicitly bound.

Michael's avatar
171
Michael
asked 2020-06-14 06:45:08 -0500
Wingware Support's avatar
4k
Wingware Support
updated 2020-06-15 14:39:10 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

This is something we'll consider adding in the future. In the meantime, you could use the GetAllFiles method of the CAPIProject object to get all the project files and then use black on them.

Wingware Support's avatar
4k
Wingware Support
answered 2020-06-15 09:28:57 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer