yapf v0.6.0 Release Notes
Release Date: 2015-10-18 // over 8 years ago-
โ Added
- โ Add knob to indent the dictionary value if there is a split before it.
๐ Changed
- No longer check that a file is a "Python" file unless the '--recursive' flag is specified.
- No longer allow the user to specify a directory unless the '--recursive' flag is specified.
๐ Fixed
- When determining if we should split a dictionary's value to a new line, use the longest entry instead of the total dictionary's length. This allows the formatter to reformat the dictionary in a more consistent manner.
- ๐ Improve how list comprehensions are formatted. Make splitting dependent upon whether the "comp_for" or "comp_if" goes over the column limit.
- Don't over indent if expression hanging indents if we expect to dedent the closing bracket.
- ๐ Improve splitting heuristic when the first argument to a function call is itself a function call with arguments. In cases like this, the remaining arguments to the function call would look badly aligned, even though they are techincally correct (the best kind of correct!).
- ๐ Improve splitting heuristic more so that if the first argument to a function call is a data literal that will go over the column limit, then we want to split before it.
- โ Remove spaces around '**' operator.
- Retain formatting of comments in the middle of an expression.
- Don't add a newline to an empty file.
- Over indent a function's parameter list if it's not distinguished from the body of the function.