Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 646 Bytes

black.md

File metadata and controls

44 lines (32 loc) · 646 Bytes

black

  • lots of import lines when wrapped
  • removes parenthesis around lines
  • removes semantic line breaks that allow you to provide structure to multiple lines
  • will add trailing full stops to doc string lines

vs autopep8

Makes very minimal changes and allows semantic formatting.

Trailing comma

foo = [1,2,3,]

black:

    foo = [
        1,
        2,
        3,
    ]

autopep8:

foo = [1, 2, 3, ]

with isort

To make isort's output black compatible:

[tool.isort]
# make isort compatible with black
line_length = 88
multi_line_output = 3
include_trailing_comma = true