Tooling for Automatic Formatting
Explore some tools in Python that allow automatic formatting of code.
We'll cover the following...
Automatic formatting
As mentioned earlier in the course, it would be wise for the team to agree on a writing convention for the code, to avoid discussing personal preferences on pull requests, and focus on the essence of the code. But agreements only get us so far, and if these rules aren't enforced, they'll get lost over time.
Besides checking for adherence to standards by means of tooling, it is useful to automatically format the code directly.
There are multiple
The black tool has a peculiarity that formats code in a unique and deterministic way, without allowing any parameters (except perhaps the length of the lines). ...