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.32.0 #502

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

Conversation

pyup-bot
Copy link
Collaborator

This PR updates yapf from 0.28.0 to 0.32.0.

Changelog

0.32.0

Added
- Look at the 'pyproject.toml' file to see if it contains ignore file information
for YAPF.
- New entry point `yapf_api.FormatTree` for formatting lib2to3 concrete
syntax trees.
- Add CI via GitHub Actions.
Changes
- Change tests to support "pytest".
- Reformat so that "flake8" is happy.
- Use GitHub Actions instead of Travis for CI.
- Clean up the FormatToken interface to limit how much it relies upon the
pytree node object.
- Rename "unwrapped_line" module to "logical_line."
- Rename "UnwrappedLine" class to "LogicalLine."
Fixed
- Enable `BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF` knob for "pep8" style, so
method definitions inside a class are surrounded by a single blank line as
prescribed by PEP8.
- Fixed the '...' token to be spaced after a colon.

0.31.0

Added
- Renamed 'master' brannch to 'main'.
- Add 'BLANK_LINES_BETWEEN_TOP_LEVEL_IMPORTS_AND_VARIABLES' to support setting
a custom number of blank lines between top-level imports and variable
definitions.
- Ignore end of line ` copybara:` directives when checking line length.
- Look at the 'pyproject.toml' file to see if it contains style information for
YAPF.
Changed
- Do not scan excluded directories. Prior versions would scan an excluded
folder then exclude its contents on a file by file basis. Preventing the
folder being scanned is faster.
Fixed
- Exclude directories on Windows.

0.30.0

Added
- Added `SPACES_AROUND_LIST_DELIMITERS`, `SPACES_AROUND_DICT_DELIMITERS`,
and `SPACES_AROUND_TUPLE_DELIMITERS` to add spaces after the opening-
and before the closing-delimiters for lists, dicts, and tuples.
- Adds `FORCE_MULTILINE_DICT` knob to ensure dictionaries always split,
even when shorter than the max line length.
- New knob `SPACE_INSIDE_BRACKETS` to add spaces inside brackets, braces, and
parentheses.
- New knob `SPACES_AROUND_SUBSCRIPT_COLON` to add spaces around the subscript /
slice operator.
Changed
- Renamed "chromium" style to "yapf". Chromium will now use PEP-8 directly.
- `CONTINUATION_ALIGN_STYLE` with `FIXED` or `VALIGN-RIGHT` now works with
space indentation.
Fixed
- Honor a disable directive at the end of a multiline comment.
- Don't require splitting before comments in a list when
`SPLIT_ALL_TOP_LEVEL_COMMA_SEPARATED_VALUES` is set. The knob is meant for
values, not comments, which may be associated with the current line.
- Don't over-indent a parameter list when not needed. But make sure it is
properly indented so that it doesn't collide with the lines afterwards.
- Don't split between two-word comparison operators: "is not", "not in", etc.

0.29.0

Added
- Add the `--quiet` flag to suppress output. The return code is 1 if there are
changes, similarly to the `--diff` flag.
- Add the `indent_closing_brackets` option. This is the same as the
`dedent_closing_brackets` option except the brackets are indented the same
as the previous line.
Changed
- Collect a parameter list into a single object. This allows us to track how a
parameter list is formatted, keeping state along the way. This helps when
supporting Python 3 type annotations.
- Catch and report `UnicodeDecodeError` exceptions.
- Improved description of .yapfignore syntax.
Fixed
- Format subscript lists so that splits are essentially free after a comma.
- Don't add a space between a string and its subscript.
- Extend discovery of '.style.yapf' & 'setup.cfg' files to search the root
directory as well.
- Make sure we have parameters before we start calculating penalties for
splitting them.
- Indicate if a class/function is nested to ensure blank lines when needed.
- Fix extra indentation in async-for else statement.
- A parameter list with no elements shouldn't count as exceeding the column
limit.
- When splitting all comma separated values, don't treat the ending bracket as
special.
- The "no blank lines between nested classes or functions" knob should only
apply to the first nested class or function, not all of them.
Links

@pyup-bot pyup-bot mentioned this pull request Dec 26, 2021
@codecov-commenter
Copy link

codecov-commenter commented Dec 26, 2021

Codecov Report

Merging #502 (98f0699) into master (247e7b4) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #502   +/-   ##
======================================
  Coverage    56.7%   56.7%           
======================================
  Files         143     143           
  Lines       10641   10641           
======================================
  Hits         6039    6039           
  Misses       4602    4602           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 247e7b4...98f0699. Read the comment docs.

@Emantor Emantor force-pushed the master branch 9 times, most recently from f3ca122 to 9710730 Compare December 2, 2022 16:13
@Emantor Emantor force-pushed the master branch 6 times, most recently from 56487e1 to d905f23 Compare January 25, 2023 13:35
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.

2 participants