PZero code style & formatting - gecos-lab/PZero GitHub Wiki

PZero code is developed with PyCharm and automatically formatted with Black. To install the Black Plugin in the pzero conda environment and in PyCharm follow these instructions.

First install black in the conda environment

conda activate pzero
conda install blackd

Then install the BlackConnect Plugin in PyCharm with File > Settings > Plugins > search "black connect" > Install.

image

Then edited BlackConnect settings from File > Settings > Tools > BlackConnect as follows:

248318924-baff79ce-bd19-422f-b307-e40dd0a9de79

Now you can find BlackConnect under Tools:

248319152-a9523e08-339d-49eb-9e53-a805b8e66825

You can use it to either reformat a selected section or all code in a file.