yapf v0.31.0 Release NotesRelease Date: 2021-03-14 // 8 months ago
- 📇 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 exlcuded directories. Prior versions would scan an exluded folder then exclude its contents on a file by file basis. Preventing the folder being scanned is faster. ### 🛠 Fixed
- 🏁 Exclude directories on Windows.
Previous changes from v0.30.0
SPACES_AROUND_TUPLE_DELIMITERSto add spaces after the opening- and before the closing-delimiters for lists, dicts, and tuples.
FORCE_MULTILINE_DICTknob to ensure dictionaries always split, even when shorter than the max line length.
- New knob
SPACE_INSIDE_BRACKETSto add spaces inside brackets, braces, and parentheses.
- New knob
SPACES_AROUND_SUBSCRIPT_COLONto add spaces around the subscript / slice operator. ### 🔄 Changed
- 💅 Renamed "chromium" style to "yapf". Chromium will now use PEP-8 directly.
VALIGN-RIGHTnow 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_VALUESis 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.