In this lesson, you will learn,
- the role of formatters
- the key benefits of using a Python formatter.
The role of a formatter is to format your code to a given standard. This may be to a set of styling guidelines (Black), sorting imports (isort) or removing unused code (autoflake).
By using a formatter, you no longer have to manually update your code to align with the necessary styling recommendations, for example adding the required spaces or line spaces, or ensuring your dictionaries or lists are formatted correctly. Therefore, by using formatters against your code you can:
- save time over manually styling your code
- ensure code is styled consistently across developers and teams.