Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update yapf to 0.21.0 #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pyup-bot
Copy link
Contributor

This PR updates yapf from 0.18.0 to 0.21.0.

Changelog

0.21.0

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.
- Add 'BLANK_LINES_AROUND_TOP_LEVEL_DEFINITION' knob to control the number
of blank lines between top-level function and class definitions.
- Added `CONTINUATION_ALIGN_STYLE` knob to choose continuation alignment style
when `USE_TABS` is enabled.
Fixed
- Don't split ellipses.

0.20.2

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.

0.20.1

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.

0.20.0

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.

0.19.0

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant