All Versions
51
Latest Version
Avg Release Cycle
78 days
Latest Release
284 days ago

Changelog History
Page 2

  • v0.22.0 Changes

    May 15, 2018

    โž• Added

    • The BLANK_LINE_BEFORE_MODULE_DOCSTRING knob adds a blank line before a module's docstring.
    • The SPLIT_ALL_COMMA_SEPARATED_VALUES knob causes all lists, tuples, dicts function defs, etc... to split on all values, instead of maximizing the number of elements on each line, when not able to fit on a single line. ### ๐Ÿ”„ Changed
    • ๐Ÿ‘Œ Improve the heuristic we use to determine when to split at the start of a function call. First check whether or not all elements can fit in the space without wrapping. If not, then we split.
    • Check all of the elements of a tuple. Similarly to how arguments are analyzed. This allows tuples to be split more rationally.
    • Adjust splitting penalties around arithmetic operators so that the code can flow more freely. The code must flow!
    • Try to meld an argument list's closing parenthesis to the last argument. ### ๐Ÿ›  Fixed
    • Attempt to determine if long lambdas are allowed. This can be done on a case-by-case basis with a "pylint" disable comment.
    • A comment before a decorator isn't part of the decorator's line.
    • Only force a new wrapped line after a comment in a decorator when it's the first token in the decorator.
  • v0.21.0 Changes

    March 18, 2018

    โž• Added

    • Introduce a new option of formatting multiline literals. Add SPLIT_BEFORE_CLOSING_BRACKET knob to control whether closing bracket should get their own line.
    • Added CONTINUATION_ALIGN_STYLE knob to choose continuation alignment style when USE_TABS is enabled.
    • Add 'BLANK_LINES_AROUND_TOP_LEVEL_DEFINITION' knob to control the number of blank lines between top-level function and class definitions. ### ๐Ÿ›  Fixed
    • Don't split ellipses.
  • v0.20.2 Changes

    February 12, 2018

    ๐Ÿ”„ Changed

    • ๐Ÿ‘Œ Improve the speed at which files are excluded by ignoring them earlier.
    • ๐Ÿ‘ Allow dictionaries to stay on a single line if they only have one entry ### ๐Ÿ›  Fixed
    • ๐Ÿ‘‰ Use tabs when constructing a continuation line when USE_TABS is enabled.
    • A dictionary entry may not end in a colon, but may be an "unpacking" operation: **foo. Take that into accound and don't split after the unpacking operator.
  • v0.20.1 Changes

    January 13, 2018

    ๐Ÿ›  Fixed

    • Don't treat 'None' as a keyword if calling a function on it, like 'ne()'.
    • ๐Ÿ‘‰ use_tabs=True always uses a single tab per indentation level; spaces are used for aligning vertically after that.
    • ๐Ÿ˜Œ Relax the split of a paren at the end of an if statement. With dedent_closing_brackets option requires that it be able to split there.
  • v0.20.0 Changes

    November 14, 2017

    โž• Added

    • ๐Ÿ‘Œ Improve splitting of comprehensions and generators. Add SPLIT_PENALTY_COMPREHENSION knob to control preference for keeping comprehensions on a single line and SPLIT_COMPLEX_COMPREHENSION to enable splitting each clause of complex comprehensions onto its own line. ### ๐Ÿ”„ Changed
    • Take into account a named function argument when determining if we should split before the first argument in a function call.
    • Split before the first argument in a function call if the arguments contain a dictionary that doesn't fit on a single line.
    • ๐Ÿ‘Œ Improve splitting of elements in a tuple. We want to split if there's a function call in the tuple that doesn't fit on the line. ### ๐Ÿ›  Fixed
    • Enforce spaces between ellipses and keywords.
    • When calculating the split penalty for a "trailer", process the child nodes afterwards because their penalties may change. For example if a list comprehension is an argument.
    • Don't enforce a split before a comment after the opening of a container if it doesn't it on the current line. We try hard not to move such comments around.
    • ๐Ÿ‘‰ Use a TextIOWrapper when reading from stdin in Python3. This is necessary for some encodings, like cp936, used on Windows.
    • โœ‚ Remove the penalty for a split before the first argument in a function call where the only argument is a generator expression.
  • v0.19.0 Changes

    October 14, 2017

    โž• Added

    • Added SPLIT_BEFORE_EXPRESSION_AFTER_OPENING_PAREN that enforces a split after the opening paren of an expression that's surrounded by parens. ### ๐Ÿ”„ Changed
    • Split before the ending bracket of a comma-terminated tuple / argument list if it's not a single element tuple / arg list. ### ๐Ÿ›  Fixed
    • Prefer to split after a comma in an argument list rather than in the middle of an argument.
    • A non-multiline string may have newlines if it contains continuation markers itself. Don't add a newline after the string when retaining the vertical space.
    • Take into account the "async" keyword when determining if we must split before the first argument.
    • Increase affinity for "atom" arguments in function calls. This helps prevent lists from being separated when they don't need to be.
    • Don't place a dictionary argument on its own line if it's the last argument in the function call where that function is part of a builder-style call.
    • Append the "var arg" type to a star in a star_expr.
  • v0.18.0 Changes

    September 18, 2017

    โž• Added

    • Option ALLOW_SPLIT_BEFORE_DICT_VALUE allows a split before a value. If False, then it won't be split even if it goes over the column limit. ### ๐Ÿ”„ Changed
    • ๐Ÿ‘‰ Use spaces around the '=' in a typed name argument to align with 3.6 syntax. ### ๐Ÿ›  Fixed
    • ๐Ÿ‘ Allow semicolons if the line is disabled.
    • ๐Ÿ›  Fix issue where subsequent comments at decreasing levels of indentation were improperly aligned and/or caused output with invalid syntax.
    • ๐Ÿ›  Fix issue where specifying a line range removed a needed line before a comment.
    • ๐Ÿ›  Fix spacing between unary operators if one is 'not'.
    • Indent the dictionary value correctly if there's a multi-line key.
    • ๐Ÿšš Don't remove needed spacing before a comment in a dict when in "chromium" style.
    • Increase indent for continuation line with same indent as next logical line with 'async with' statement.
  • v0.17.0 Changes

    August 20, 2017

    โž• Added

    • Option NO_SPACES_AROUND_SELECTED_BINARY_OPERATORS prevents adding spaces around selected binary operators, in accordance with the current style guide. ### ๐Ÿ”„ Changed
    • Adjust blank lines on formatting boundaries when using the --lines option.
    • Return 1 if a diff changed the code. This is in line with how GNU diff acts.
    • โž• Add -vv flag to print out file names as they are processed ### ๐Ÿ›  Fixed
    • Corrected how DEDENT_CLOSING_BRACKETS and COALESCE_BRACKETS interacted.
    • ๐Ÿ›  Fix return value to return a boolean.
    • ๐Ÿ”Œ Correct vim plugin not to clobber edited code if yapf returns an error.
    • Ensured comma-terminated tuples with multiple elements are split onto separate lines.
  • v0.16.3 Changes

    July 13, 2017

    ๐Ÿ”„ Changed

    • โž• Add filename information to a ParseError exception. ### ๐Ÿ›  Fixed
    • A token that ends in a continuation marker may have more than one newline in it, thus changing its "lineno" value. This can happen if multiple continuation markers are used with no intervening tokens. Adjust the line number to account for the lines covered by those markers.
    • ๐Ÿ‘‰ Make sure to split after a comment even for "pseudo" parentheses.
  • v0.16.2 Changes

    May 19, 2017

    ๐Ÿ›  Fixed

    • Treat expansion operators ('', '*') in a similar way to function calls to avoid splitting directly after the opening parenthesis.
    • Increase the penalty for splitting after the start of a tuple.
    • Increase penalty for excess characters.
    • Check that we have enough children before trying to access them all.
    • โœ‚ Remove trailing whitespaces from comments.
    • Split before a function call in a list if the full list isn't able to fit on a single line.
    • Trying not to split around the '=' of a named assign.
    • ๐Ÿ”„ Changed split before the first argument behavior to ignore compound statements like if and while, but not function declarations.
    • ๐Ÿ”„ Changed coalesce brackets not to line split before closing bracket.