I was wondering if we could decide on a formatter to format the code according to one convention. I had talked to @stenczelt about this before and he also uses black, which might be a good suggestion as its a widely used formatter.
Why add a formatter
Easier to merge pull requests: as all conventions are the same, it is easier to merge pull requests as the only differences are in code content rather than which quotation marks were used ect.
Ease of reading code
Simple to use
Now might be a good time to improve formatting, as there are significant changes with the file structure already.
How to use?
pip install black
# or
conda install -c conda-forge black
To use black simpy do: black file_to_format.py or use black * to format whole direcotries, or whole repository. The easiest way to use black is by integrating it into your favourite editor and formatting upon save: for VS Code, for Jupyter Noteooks.
I was wondering if we could decide on a formatter to format the code according to one convention. I had talked to @stenczelt about this before and he also uses
black
, which might be a good suggestion as its a widely used formatter.Why add a formatter
How to use?
To use black simpy do:
black file_to_format.py
or useblack *
to format whole direcotries, or whole repository. The easiest way to use black is by integrating it into your favourite editor and formatting upon save: for VS Code, for Jupyter Noteooks.