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
technically 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.