yapf v0.28.0 Release Notes

Release Date: 2019-07-11 // almost 5 years ago
  • โž• Added

    • New knob SPLIT_ALL_TOP_LEVEL_COMMA_SEPARATED_VALUES is a variation on SPLIT_ALL_COMMA_SEPARATED_VALUES in which, if a subexpression with a comma fits in its starting line, then the subexpression is not split (thus avoiding unnecessary splits). ### ๐Ÿ”„ Changed
    • Set INDENT_DICTIONARY_VALUE for Google style.
    • Set JOIN_MULTIPLE_LINES = False for Google style. ### ๐Ÿ›  Fixed
    • BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF=False wasn't honored because the number of newlines was erroneously calculated beforehand.
    • Lambda expressions shouldn't have an increased split penalty applied to the 'lambda' keyword. This prevents them from being properly formatted when they're arguments to functions.
    • A comment with continuation markers (??) shouldn't mess with the lineno count.
    • Only emit unformatted if the "disable long line" is at the end of the line. Otherwise we could mess up formatting for containers which have them interspersed with code.
    • ๐Ÿ›  Fix a potential race condition by using the correct style for opening a file which may not exist.