black v18.9.b0 Release Notes

Release Date: 2018-09-26 // over 5 years ago
    • numeric literals are now formatted by Black (#452, #461, #464, #469):

      • numeric literals are normalized to include _ separators on Python 3.6+ code
      • added --skip-numeric-underscore-normalization to disable the above behavior and leave numeric underscores as they were in the input
      • code with _ in numeric literals is recognized as Python 3.6+
      • most letters in numeric literals are lowercased (e.g., in 1e10, 0x01)
      • hexadecimal digits are always uppercased (e.g. 0xBADC0DE)
    • โž• added blackd, see its documentation for more info (#349)

    • adjacent string literals are now correctly split into multiple lines (#463)

    • trailing comma is now added to single imports that don't fit on a line (#250)

    • cache is now populated when --check is successful for a file which speeds up consecutive checks of properly formatted unmodified files (#448)

    • ๐Ÿšš whitespace at the beginning of the file is now removed (#399)

    • ๐Ÿ›  fixed mangling pweave and Spyder IDE special comments (#532)

    • ๐Ÿ›  fixed unstable formatting when unpacking big tuples (#267)

    • fixed parsing of __future__ imports with renames (#389)

    • ๐Ÿ›  fixed scope of # fmt: off when directly preceding yield and other nodes (#385)

    • ๐Ÿ›  fixed formatting of lambda expressions with default arguments (#468)

    • fixed async for statements: Black no longer breaks them into separate lines (#372)

    • 0๏ธโƒฃ note: the Vim plugin stopped registering ,= as a default chord as it turned out to be a bad idea (#415)