logo

... black.


Odds are that you'll have lots of discussions on code style with your colleagues. Instead of argueing it may be a better idea to just have a standard that automatically formats all of your code. In this scenarios you may want to use black.


Notes

This is the contents of the file before we apply black;

list_of_numbers = [
    1,
    2,
    3
]

large_dictionary = {1:2, 3:4, 5:6, 7:8, 9:10, 11:12, 13:14, 15:16, 17:18, 19:20, 21:22, 23:24}

This is the contents after black;

list_of_numbers = [1, 2, 3, 4, 5, 6, 7, 8]

large_dictionary = {
    1: 2,
    3: 4,
    5: 6,
    7: 8,
    9: 10,
    11: 12,
    13: 14,
    15: 16,
    17: 18,
    19: 20,
    21: 22,
    23: 24,
}

Feedback? See an issue? Something unclear? Feel free to mention it here.

If you want to be kept up to date, consider getting the newsletter.