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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Michael's avatar
171
Michael
asked 4 years ago
Wingware Support's avatar
4.2k
Wingware Support
updated 4 years ago

Comments

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Wingware Support's avatar
4.2k
Wingware Support
answered 4 years ago
link

Comments

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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)