blob: 032f65d04c61f079268969f9e799fc55565b3509 [file] [log] [blame]
Bill Wendlingdcafd5f2015-09-12 15:26:03 -07001# Change Log
2# All notable changes to this project will be documented in this file.
3# This project adheres to [Semantic Versioning](http://semver.org/).
4
Bill Wendlinga6988c32016-05-22 18:47:11 -07005## [0.9.0] UNRELEASED
6### Added
7- Added a knob to adjust the split penalty before an if expression. This allows
8 the user to place a list comprehension all on one line.
9
Bill Wendling7edb3842016-05-21 15:07:54 -070010### Fixed
11- Don't split before a first element list argument as we would before a first
12 element function call.
Bill Wendlinge8a85692016-05-21 23:57:20 -070013- Don't penalize when we must split a line.
Bill Wendling283f4ea2016-05-23 16:19:15 -070014- Allow splitting before the single argument in a function call.
Bill Wendling7edb3842016-05-21 15:07:54 -070015
Bill Wendlingd2a585d2016-05-21 00:41:24 -070016## [0.8.2] 2016-05-21
Bill Wendling72cd2342016-05-19 01:28:58 -070017### Fixed
18- Prefer not to split after the opening of a subscript.
Bill Wendling1e179bb2016-05-19 01:51:34 -070019- Don't add space before the 'await' keyword if it's preceded by an opening
20 paren.
Bill Wendling4b6cead2016-05-19 11:33:38 -070021- When we're setting the split penalty for a continuous list, we don't want to
22 mistake a comment at the end of that list as part of the list.
Bill Wendlingda6ab272016-05-19 21:45:34 -070023- When calculating blank lines, don't assume the last seen object was a class
24 or function when we're in a class or function.
Bill Wendlingf61861d2016-05-21 00:36:27 -070025- Don't count the closing scope when determining if the current scope is the
26 last scope on the line.
Bill Wendling72cd2342016-05-19 01:28:58 -070027
Bill Wendlingde2c5b22016-05-18 21:10:29 -070028## [0.8.1] 2016-05-18
Bill Wendling8f1d1402016-05-14 19:22:48 -070029### Fixed
30- 'SPLIT_BEFORE_LOGICAL_OPERATOR' wasn't working correctly. The penalty was
31 being set incorrectly when it was part of a larger construct.
Bill Wendling99cbd562016-05-15 18:41:12 -070032- Don't separate a keyword, like "await", from a left paren.
Bill Wendling311c0872016-05-18 01:51:12 -070033- Don't rely upon the original tokens' line number to determine if we should
34 perform splitting in Facebook mode. The line number isn't the line number of
35 the reformatted token, but the line number where it was in the original code.
36 Instead, we need to carefully determine if the line is liabel to be split and
37 act accordingly.
Bill Wendling8f1d1402016-05-14 19:22:48 -070038
Bill Wendlingfe7a4ac2016-05-10 23:51:57 -070039## [0.8.0] 2016-05-10
Bill Wendling9dc79082016-05-10 00:23:53 -070040### Added
Bill Wendling43eaa752016-05-12 01:25:20 -070041- Add a knob, 'SPACES_AROUND_POWER_OPERATOR', to allow adding spaces around the
42 power operator.
Bill Wendling9dc79082016-05-10 00:23:53 -070043
Bill Wendlingf015a3c2016-04-21 20:14:24 -070044### Fixed
45- There shouldn't be a space between a decorator and an intervening comment.
Bill Wendling3e15d002016-04-28 00:16:32 -070046- If we split before a bitwise operator, then we assume that the programmer
47 knows what they're doing, more or less, and so we enforce a split before said
48 operator if one exists in the original program.
Bill Wendlingadf1d442016-05-10 01:03:50 -070049- Strengthen the bond between a keyword and value argument.
Bill Wendling93c42d92016-05-10 23:35:57 -070050- Don't add a blank line after a multiline string.
Bill Wendlingcae1edd2016-05-10 23:49:19 -070051- If the "for" part of a list comprehension can exist on the starting line
52 without going over the column limit, then let it remain there.
Bill Wendlingf015a3c2016-04-21 20:14:24 -070053
Bill Wendling8d36eb82016-04-21 02:33:36 -070054## [0.7.1] 2016-04-21
Bill Wendling4dc472d2016-04-10 03:03:55 -070055### Fixed
56- Don't rewrite the file if there are no changes.
Bill Wendlingac00a252016-04-12 05:31:03 -070057- Ensure the proper number of blank lines before an async function.
Bill Wendlingc4a49652016-04-13 13:42:43 -070058- Split after a bitwise operator when in PEP 8 mode.
Bill Wendling423759f2016-04-14 21:14:20 -070059- Retain the splitting within a dictionary data literal between the key and
60 value.
Bill Wendling9882f3d2016-04-21 02:29:35 -070061- Try to keep short function calls all on one line even if they're part of a
62 larger series of tokens. This stops us from splitting too much.
Bill Wendling4dc472d2016-04-10 03:03:55 -070063
Bill Wendlingdefe5f32016-04-09 22:29:51 -070064## [0.7.0] 2016-04-09
Bill Wendling2e588512016-03-13 01:02:47 -080065### Added
Bill Wendling5758e4d2016-03-19 03:38:48 -070066- Support for Python 3.5.
67- Add 'ALLOW_MULTILINE_LAMBDAS' which allows lambdas to be formatted onto
68 multiple lines.
Bill Wendling2e588512016-03-13 01:02:47 -080069
70### Fixed
71- Lessen penalty for splitting before a dictionary keyword.
Bill Wendling90a2aa52016-03-20 02:25:13 -070072- Formatting of trailing comments on disabled formatting lines.
Bill Wendling2064d882016-04-09 22:21:15 -070073- Disable / enable formatting at end of multi-line comment.
Bill Wendling2e588512016-03-13 01:02:47 -080074
Bill Wendling0bca2aa2016-03-06 20:44:14 -080075## [0.6.3] 2016-03-06
76### Changed
77- Documentation updated.
78
Bill Wendling95e47b92015-11-04 22:58:30 -080079### Fixed
80- Fix spacing of multiline comments when formatting is disabled.
81
Bill Wendling9ffd8152015-11-01 17:49:25 -080082## [0.6.2] 2015-11-01
Bill Wendling6e8ca7b2015-10-25 01:16:43 -070083### Changed
84- Look at the 'setup.cfg' file to see if it contains style information for
85 YAPF.
Bill Wendling169790e2015-10-25 03:13:13 -070086- Look at the '~/.config/yapf/style' file to see if it contains global style
87 information for YAPF.
Bill Wendling6e8ca7b2015-10-25 01:16:43 -070088
Bill Wendling57ffbbb2015-10-25 00:20:14 -070089### Fixed
90- Make lists that can fit on one line more likely to stay together.
Bill Wendling5091fa62015-10-28 01:51:53 -070091- Correct formatting of '*args' and '**kwargs' when there are default values in
92 the argument list.
Bill Wendling57ffbbb2015-10-25 00:20:14 -070093
Bill Wendling348b2f32015-10-24 03:20:10 -070094## [0.6.1] 2015-10-24
Bill Wendling3a3cb6d2015-10-20 13:40:27 -070095### Fixed
96- Make sure to align comments in data literals correctly. Also make sure we
97 don't count a "#." in a string as an i18n comment.
Bill Wendlinga6b57a62015-10-20 13:57:52 -070098- Retain proper vertical spacing before comments in a data literal.
Bill Wendling843e48c2015-10-20 16:53:08 -070099- Make sure that continuations from a compound statement are distinguished from
100 the succeeding line.
Bill Wendling81e37b62015-10-21 13:18:29 -0700101- Ignore preceding comments when calculating what is a "dictonary maker".
Bill Wendlinga5585722015-10-21 15:32:22 -0700102- Add a small penalty for splitting before a closing bracket.
Bill Wendlingdbcf3422015-10-21 22:11:15 -0700103- Ensure that a space is enforced after we remove a pseudo-paren that's between
104 two names, keywords, numbers, etc.
Bill Wendlingf8856722015-10-21 23:53:29 -0700105- Increase the penalty for splitting after a pseudo-paren. This could lead to
106 less readable code in some circumstances.
Bill Wendling3a3cb6d2015-10-20 13:40:27 -0700107
Bill Wendling7ef492b2015-10-18 14:43:06 -0700108## [0.6.0] 2015-10-18
Bill Wendlinga5cef8e2015-10-15 21:42:03 -0700109### Added
110- Add knob to indent the dictionary value if there is a split before it.
111
Bill Wendlingcec66962015-10-17 04:08:23 -0700112### Changed
113- No longer check that a file is a "Python" file unless the '--recursive' flag
114 is specified.
115- No longer allow the user to specify a directory unless the '--recursive' flag
116 is specified.
117
Bill Wendlingc87690c2015-10-11 16:45:21 -0700118### Fixed
119- When determining if we should split a dictionary's value to a new line, use
120 the longest entry instead of the total dictionary's length. This allows the
121 formatter to reformat the dictionary in a more consistent manner.
Bill Wendling0946c0f2015-10-12 00:42:30 -0700122- Improve how list comprehensions are formatted. Make splitting dependent upon
123 whether the "comp_for" or "comp_if" goes over the column limit.
Bill Wendling43bdc7b2015-10-12 14:25:30 -0700124- Don't over indent if expression hanging indents if we expect to dedent the
125 closing bracket.
Bill Wendlingc1052c62015-10-15 03:12:28 -0700126- Improve splitting heuristic when the first argument to a function call is
127 itself a function call with arguments. In cases like this, the remaining
128 arguments to the function call would look badly aligned, even though they are
129 techincally correct (the best kind of correct!).
Bill Wendlingb1037b52015-10-15 22:38:19 -0700130- Improve splitting heuristic more so that if the first argument to a function
131 call is a data literal that will go over the column limit, then we want to
132 split before it.
Bill Wendling8d8f5122015-10-16 11:46:23 -0700133- Remove spaces around '**' operator.
Bill Wendlingf8325e62015-10-16 15:38:54 -0700134- Retain formatting of comments in the middle of an expression.
Bill Wendling454cef62015-10-18 03:49:03 -0700135- Don't add a newline to an empty file.
Bill Wendling7ef492b2015-10-18 14:43:06 -0700136- Over indent a function's parameter list if it's not distinguished from the
137 body of the function.
Bill Wendlingc87690c2015-10-11 16:45:21 -0700138
Bill Wendling2aff7fc2015-10-11 14:08:10 -0700139## [0.5.0] 2015-10-11
Bill Wendlingd03c99f2015-10-08 21:06:07 -0700140### Added
141- Add option to exclude files/directories from formatting.
Bill Wendling5c608732015-10-10 23:39:16 -0700142- Add a knob to control whether import names are split after the first '('.
Bill Wendlingd03c99f2015-10-08 21:06:07 -0700143
Bill Wendlinga7e3f502015-10-08 00:23:40 -0700144### Fixed
145- Indent the continuation of an if-then statement when it's not distinguished
146 from the body of the if-then.
Bill Wendling1ce18c72015-10-10 23:12:16 -0700147- Allow for sensible splitting of array indices where appropriate.
Bill Wendlingbe974d82015-10-11 01:04:00 -0700148- Prefer to not split before the ending bracket of an atom. This produces
149 better code in most cases.
Bill Wendlingbbd148c2015-10-11 01:45:24 -0700150- Corrected how horizontal spaces were presevered in a disabled region.
Bill Wendlinga7e3f502015-10-08 00:23:40 -0700151
Bill Wendling967c3b22015-10-07 22:20:18 -0700152## [0.4.0] 2015-10-07
Ɓukasz Langa94089872015-09-22 16:02:26 -0700153### Added
154- Support for dedenting closing brackets, "facebook" style.
155
Bill Wendling25c8e602015-10-04 20:48:35 -0700156### Fixed
157- Formatting of tokens after a multiline string didn't retain their horizontal
158 spacing.
159
Bill Wendling06865ab2015-09-30 01:25:47 -0700160## [0.3.1] 2015-09-30
161### Fixed
162- Format closing scope bracket correctly when indentation size changes.
163
Bill Wendlinga690a622015-09-20 12:38:50 -0700164## [0.3.0] 2015-09-20
165### Added
166- Return a 2 if the source changed, 1 on error, and 0 for no change.
167
168### Fixed
169- Make sure we format if the "lines" specified are in the middle of a
170 statement.
171
Bill Wendling9adfa0c2015-09-13 05:37:30 -0700172## [0.2.9] - 2015-09-13
173### Fixed
174- Formatting of multiple files. It was halting after formatting the first file.
175
Bill Wendlingdcafd5f2015-09-12 15:26:03 -0700176## [0.2.8] - 2015-09-12
177### Added
178- Return a non-zero exit code if the source was changed.
179- Add bitwise operator splitting penalty and prefer to split before bitwise
180 operators.
181
182### Fixed
183- Retain vertical spacing between disabled and enabled lines.
184- Split only at start of named assign.
185- Retain comment position when formatting is disabled.
186- Honor splitting before or after logical ops.