blob: cf46f2908f87e38a11ef090ce00254e45991ab15 [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
Kevin Coxc565e832017-07-21 13:50:47 +01005## [0.16.4] Unreleased
6### Changed
7- Adjust blank lines on formatting boundaries when using the `--lines` option.
Bill Wendling71d9b2e2017-08-01 13:38:54 -07008- Return 1 if a diff changed the code. This is in line with how GNU diff acts.
Richard Wallacad4ce2017-08-04 15:08:40 +01009### Fixed
10- Corrected how `DEDENT_CLOSING_BRACKETS` and `COALESCE_BRACKETS` interacted.
Bill Wendlingb0de56d2017-08-12 15:21:12 -070011- Fix return value to return a boolean.
Anton Yuzhaninovdb85e872017-07-19 22:45:45 -040012- Correct vim plugin not to clobber edited code if yapf returns an error.
Kevin Coxc565e832017-07-21 13:50:47 +010013
Bill Wendling4aa43d82017-07-13 00:45:39 -070014## [0.16.3] 2017-07-13
Bill Wendling81a6d842017-07-12 23:58:17 -070015### Changed
16- Add filename information to a ParseError excetion.
Bill Wendling77ca21d2017-03-28 00:41:18 -070017### Fixed
Bill Wendling4aa43d82017-07-13 00:45:39 -070018- A token that ends in a continuation marker may have more than one newline in
19 it, thus changing its "lineno" value. This can happen if multiple
20 continuation markers are used with no intervening tokens. Adjust the line
21 number to account for the lines covered by those markers.
22- Make sure to split after a comment even for "pseudo" parentheses.
23
24## [0.16.2] 2017-05-19
25### Fixed
Bill Wendling77ca21d2017-03-28 00:41:18 -070026- Treat expansion operators ('*', '**') in a similar way to function calls to
27 avoid splitting directly after the opening parenthesis.
28- Increase the penalty for splitting after the start of a tuple.
Bill Wendlinge67e3532017-03-31 00:43:00 -070029- Increase penalty for excess characters.
Bill Wendling16becc52017-04-02 19:52:49 -070030- Check that we have enough children before trying to access them all.
Bill Wendlingda3697c2017-04-13 00:32:09 -070031- Remove trailing whitespaces from comments.
Bill Wendlinga36bb6d2017-04-16 18:51:53 -070032- Split before a function call in a list if the full list isn't able to fit on
33 a single line.
Bill Wendling1cfcbd12017-04-17 19:38:28 -070034- Trying not to split around the '=' of a named assign.
Bill Wendling81a6d842017-07-12 23:58:17 -070035- Changed split before the first argument behavior to ignore compound
36 statements like if and while, but not function declarations.
37- Changed coalesce brackets not to line split before closing bracket.
Bill Wendling77ca21d2017-03-28 00:41:18 -070038
Bill Wendling5ca31092017-03-22 11:41:07 -070039## [0.16.1] 2017-03-22
Bill Wendling5a1e3312017-02-14 18:40:43 -080040### Changed
41- Improved performance of cloning the format decision state object. This
42 improved the time in one *large* case from 273.485s to 234.652s.
Bill Wendlingc2f520c2017-02-15 22:03:18 -080043- Relax the requirement that a named argument needs to be on one line. Going
44 over the column limit is more of an issue to pylint than putting named args
45 on multiple lines.
Bill Wendling79b82ef2017-02-17 00:24:51 -080046- Don't make splitting penalty decisions based on the original formatting. This
47 can and does lead to non-stable formatting, where yapf will reformat the same
48 code in different ways.
Bill Wendlinga9529662017-02-06 21:47:39 -080049### Fixed
50- Ensure splitting of arguments if there's a named assign present.
Bill Wendling56f0fb62017-02-06 22:58:05 -080051- Prefer to coalesce opening brackets if it's not at the beginning of a
52 function call.
Bill Wendling313c65a2017-02-17 01:56:45 -080053- Prefer not to squish all of the elements in a function call over to the
54 right-hand side. Split the arguments instead.
Bill Wendling257c1b02017-02-20 15:32:29 -080055- We need to split a dictionary value if the first element is a comment anyway,
56 so don't force the split here. It's forced elsewhere.
CaselITd69801d2017-02-21 13:45:13 +010057- Ensure tabs are used for continued indentation when USE_TABS is True.
Bill Wendlinga9529662017-02-06 21:47:39 -080058
Bill Wendling873039e2017-02-05 20:24:46 -080059## [0.16.0] 2017-02-05
Bill Wendling0e9b3212017-01-31 14:41:00 -080060### Added
61- The `EACH_DICT_ENTRY_ON_SEPARATE_LINE` knob indicates that each dictionary
62 entry should be in separate lines if the full dictionary isn't able to fit on
63 a single line.
64- The `SPLIT_BEFORE_DICT_SET_GENERATOR` knob splits before the `for` part of a
65 dictionary/set generator.
Bill Wendling9f497522017-02-04 04:39:47 -080066- The `BLANK_LINE_BEFORE_CLASS_DOCSTRING` knob adds a blank line before a
67 class's docstring.
Bill Wendling8d321362017-02-05 18:29:26 -080068- The `ALLOW_MULTILINE_DICTIONARY_KEYS` knob allows dictionary keys to span
69 more than one line.
Bill Wendling94962e52017-02-04 04:07:19 -080070### Fixed
71- Split before all entries in a dict/set or list maker when comma-terminated,
72 even if there's only one entry.
Adrian Tejn Kernbfee67d2017-02-05 08:36:02 +010073- Will now try to set O_BINARY mode on stdout under Windows and Python 2.
74- Avoid unneeded newline transformation when writing formatted code to
75 output on (affects only Python 2)
Bill Wendling0e9b3212017-01-31 14:41:00 -080076
Bill Wendling3d470dd2017-01-29 19:45:13 -080077## [0.15.2] 2017-01-29
Bill Wendlingbf631182017-01-24 15:34:35 -080078### Fixed
79- Don't perform a global split when a named assign is part of a function call
80 which itself is an argument to a function call. I.e., don't cause 'a' to
81 split here:
82
83 func(a, b, c, d(x, y, z=42))
Bill Wendlingb64e7022017-01-25 09:44:41 -080084- Allow splitting inside a subscript if it's a logical or bitwise operating.
85 This should keep the subscript mostly contiguous otherwise.
Bill Wendlingbf631182017-01-24 15:34:35 -080086
Bill Wendling5d7b3612017-01-21 23:43:35 -080087## [0.15.1] 2017-01-21
Bill Wendling672ece02017-01-14 16:35:48 -080088### Fixed
89- Don't insert a space between a type hint and the '=' sign.
Bill Wendlingb57e71c2017-01-14 16:51:35 -080090- The '@' operator can be used in Python 3 for matrix multiplication. Give the
91 '@' in the decorator a DECORATOR subtype to distinguish it.
Bill Wendlingfd30b912017-01-15 16:45:24 -080092- Encourage the formatter to split at the beginning of an argument list instead
93 of in the middle. Especially if the middle is an empty parameter list. This
94 adjusts the affinity of binary and comparison operators. In particular, the
95 "not in" and other such operators don't want to have a split after it (or
96 before it) if at all possible.
Bill Wendling672ece02017-01-14 16:35:48 -080097
Bill Wendling61061f62017-01-12 20:58:55 -080098## [0.15.0] 2017-01-12
99### Added
100- Keep type annotations intact as much as possible. Don't try to split the over
101 mutliple lines.
Bill Wendlingb50a6b22016-11-27 17:06:58 -0800102### Fixed
103- When determining if each element in a dictionary can fit on a single line, we
104 are skipping dictionary entries. However, we need to ignore comments in our
105 calculations and implicitly concatenated strings, which are already placed on
106 separate lines.
Bill Wendling596300d2016-11-28 13:08:57 -0800107- Allow text before a "pylint" comment.
Bill Wendlingeb979f32016-11-28 13:16:04 -0800108- Also allow text before a "yapf: (disable|enable)" comment.
Bill Wendlingb50a6b22016-11-27 17:06:58 -0800109
Bill Wendling544a2812016-11-21 15:29:19 -0800110## [0.14.0] 2016-11-21
Bill Wendling61061f62017-01-12 20:58:55 -0800111### Added
Diogo de Campos2f246c02016-10-06 14:04:38 +0200112- formatting can be run in parallel using the "-p" / "--parallel" flags.
Bill Wendling6041f222016-11-02 01:07:39 -0700113### Fixed
114- "not in" and "is not" should be subtyped as binary operators.
Bill Wendlingccea10e2016-11-08 16:26:21 -0800115- A non-Node dictionary value may have a comment before it. In those cases, we
116 want to avoid encompassing only the comment in pseudo parens. So we include
117 the actual value as well.
Bill Wendlingf7286532016-11-16 17:52:50 -0800118- Adjust calculation so that pseudo-parentheses don't count towards the total
119 line length.
Bill Wendling508694b2016-11-20 23:52:52 -0800120- Don't count a dictionary entry as not fitting on a single line in a
121 dictionary.
Bill Wendling47c3e4f2016-11-21 15:25:09 -0800122- Don't count pseudo-parentheses in the length of the line.
Bill Wendling6041f222016-11-02 01:07:39 -0700123
Bill Wendling35d6b7c2016-10-22 01:18:51 -0700124## [0.13.2] 2016-10-22
125### Fixed
126- REGRESSION: A comment may have a prefix with newlines in it. When calculating
127 the prefix indent, we cannot take the newlines into account. Otherwise, the
128 comment will be misplaced causing the code to fail.
129
Bill Wendlingf3e09652016-10-17 14:26:41 -0700130## [0.13.1] 2016-10-17
131### Fixed
132- Correct emitting a diff that was accidentally removed.
133
Bill Wendling31f82132016-10-16 22:54:01 -0700134## [0.13.0] 2016-10-16
Bill Wendlingcec6b192016-10-16 00:30:02 -0500135### Added
136- Added support to retain the original line endings of the source code.
137
Bill Wendlinga5a52e22016-10-11 13:40:38 -0700138### Fixed
139- Functions or classes with comments before them were reformatting the comments
140 even if the code was supposed to be ignored by the formatter. We now don't
141 adjust the whitespace before a function's comment if the comment is a
142 "disabled" line. We also don't count "# yapf: {disable|enable}" as a disabled
143 line, which seems logical.
Bill Wendlinge6c93572016-10-11 20:26:23 -0700144- It's not really more readable to split before a dictionary value if it's part
145 of a dictionary comprehension.
Bill Wendling556f9152016-10-13 01:27:38 -0700146- Enforce two blank lines after a function or class definition, even before a
Bill Wendling7cc4d182016-10-13 11:26:26 -0700147 comment. (But not between a decorator and a comment.) This is related to PEP8
148 error E305.
Bill Wendling0d372eb2016-10-14 00:36:21 -0700149- Remove O(n^2) algorithm from the line disabling logic.
Bill Wendlinga5a52e22016-10-11 13:40:38 -0700150
Bill Wendlingc2620f92016-10-09 20:40:15 -0700151## [0.12.2] 2016-10-09
Bill Wendling293cb6c2016-10-02 16:46:11 -0700152### Fixed
153- If `style.SetGlobalStyle(<create pre-defined style>)` was called and then
154 `yapf_api.FormatCode` was called, the style set by the first call would be
155 lost, because it would return the style created by `DEFAULT_STYLE_FACTORY`,
156 which is set to PEP8 by default. Fix this by making the first call set which
157 factory we call as the "default" style.
Bill Wendling85b5a632016-10-03 20:30:43 -0700158- Don't force a split before non-function call arguments.
Bill Wendling261c79a2016-10-03 20:58:08 -0700159- A dictionary being used as an argument to a function call and which can exist
160 on a single line shouldn't be split.
Bill Wendling35edcbd2016-10-03 22:33:34 -0700161- Don't rely upon the original line break to determine if we should split
Bill Wendlingc18abac2016-10-03 22:49:52 -0700162 before the elements in a container. Especially split if there's a comment in
163 the container.
Bill Wendling690132a2016-10-04 22:55:47 -0700164- Don't add spaces between star and args in a lambda expression.
Bill Wendlingeef8fbd2016-10-05 00:34:25 -0700165- If a nested data structure terminates in a comma, then split before the first
166 element, but only if there's more than one element in the list.
Bill Wendling293cb6c2016-10-02 16:46:11 -0700167
168## [0.12.1] 2016-10-02
Bill Wendling1960ffc2016-10-01 23:57:05 -0700169### Changed
170- Dictionary values will be placed on the same line as the key if *all* of the
171 elements in the dictionary can be placed on one line. Otherwise, the
172 dictionary values will be placed on the next line.
173
Bill Wendlinge0412442016-09-28 02:19:31 -0700174### Fixed
175- Prefer to split before a terminating r-paren in an argument list if the line
176 would otherwise go over the column limit.
Bill Wendling21836ef2016-09-28 19:13:16 -0700177- Split before the first key in a dictionary if the dictionary cannot fit on a
178 single line.
Bill Wendling61997072016-09-30 00:45:59 -0700179- Don't count "pylint" comments when determining if the line goes over the
180 column limit.
Bill Wendling0e703572016-10-01 23:02:32 -0700181- Don't count the argument list of a lambda as a named assign in a function
182 call.
Bill Wendlinge0412442016-09-28 02:19:31 -0700183
Bill Wendling1b919632016-09-25 16:03:04 -0700184## [0.12.0] 2016-09-25
Bill Wendling90eab552016-08-19 23:47:23 -0700185### Added
186- Support formatting of typed names. Typed names are formatted a similar way to
187 how named arguments are formatted, except that there's a space after the
188 colon.
Alexander Lenz5fda36a2016-08-26 17:27:57 +0200189- Add a knob, 'SPACES_AROUND_DEFAULT_OR_NAMED_ASSIGN', to allow adding spaces
190 around the assign operator on default or named assigns.
Bill Wendling90eab552016-08-19 23:47:23 -0700191
Bill Wendling7c7f6032016-08-31 10:46:33 -0700192## Changed
193- Turn "verification" off by default for external APIs.
Bill Wendlingf0dd0a42016-09-25 15:54:02 -0700194- If a function call in an argument list won't fit on the current line but will
195 fit on a line by itself, then split before the call so that it won't be split
196 up unnecessarily.
Bill Wendling7c7f6032016-08-31 10:46:33 -0700197
Bill Wendlinga6fb6f72016-09-17 14:39:26 -0700198## Fixed
199- Don't add space after power operator if the next operator's a unary operator.
200
Bill Wendling79ee44a2016-08-17 00:33:02 -0700201## [0.11.1] 2016-08-17
Bill Wendling7b87b0a2016-08-17 00:01:56 -0700202### Changed
203- Issue #228: Return exit code 0 on success, regardless of whether files were
204 changed. (Previously, 0 meant success with no files
205 modified, and 2 meant success with at least one file modified.)
206
Bill Wendlingf4de4c62016-07-21 00:08:29 -0700207### Fixed
208- Enforce splitting each element in a dictionary if comma terminated.
Bill Wendlingb8d20bd2016-08-05 23:44:23 -0700209- It's okay to split in the middle of a dotted name if the whole expression is
210 going to go over the column limit.
Bill Wendling15edda22016-08-15 17:04:26 -0700211- Asynchronous functions were going missing if they were preceded by a comment
212 (a what? exactly). The asynchronous function processing wasn't taking the
213 comment into account and thus skipping the whole function.
Bill Wendling7b87b0a2016-08-17 00:01:56 -0700214- The splitting of arguments when comma terminated had a conflict. The split
215 penalty of the closing bracket was set to the maximum, but it shouldn't be if
216 the closing bracket is preceded by a comma.
Reece Hart039c0b52016-08-11 13:46:15 -0700217
Bill Wendling1d8638e2016-07-17 00:06:01 -0700218## [0.11.0] 2016-07-17
Ben Plotnick7e088292016-06-09 18:29:56 -0700219### Added
220- The COALESCE_BRACKETS knob prevents splitting consecutive brackets when
221 DEDENT_CLOSING_BRACKETS is set.
Bill Wendling61e80c02016-07-14 16:50:10 -0700222- Don't count "pylint" directives as exceeding the column limit.
Ben Plotnick7e088292016-06-09 18:29:56 -0700223
Bill Wendling33636712016-07-16 02:49:28 -0700224### Changed
225- We split all of the arguments to a function call if there's a named argument.
Bill Wendling2df29282016-07-16 17:23:41 -0700226 In this case, we want to split after the opening bracket too. This makes
Bill Wendling33636712016-07-16 02:49:28 -0700227 things look a bit better.
228
Bill Wendling4761b182016-07-03 00:11:14 -0700229### Fixed
230- When retaining format of a multiline string with Chromium style, make sure
231 that the multiline string doesn't mess up where the following comma ends up.
Bill Wendling821a36f2016-07-13 23:02:16 -0700232- Correct for when 'lib2to3' smooshes comments together into the same DEDENT
233 node.
Bill Wendling4761b182016-07-03 00:11:14 -0700234
Bill Wendling7521d4b2016-06-14 01:35:38 -0700235## [0.10.0] 2016-06-14
Draconye582d632016-06-05 11:48:26 +0200236### Added
237- Add a knob, 'USE_TABS', to allow using tabs for indentation.
Bill Wendling184c2de2016-06-13 03:21:04 -0700238
Bill Wendlingb0285ba2016-05-31 16:10:59 -0700239### Changed
240- Performance enhancements.
241
Draconye582d632016-06-05 11:48:26 +0200242### Fixed
Bill Wendlingd02b5922016-06-03 23:48:19 -0700243- Don't split an import list if it's not surrounded by parentheses.
244
Bill Wendling90f361f2016-05-29 16:13:10 -0700245## [0.9.0] 2016-05-29
Bill Wendlinga6988c32016-05-22 18:47:11 -0700246### Added
Bill Wendling1e161592016-05-23 16:34:03 -0700247- Added a knob (SPLIT_PENALTY_BEFORE_IF_EXPR) to adjust the split penalty
248 before an if expression. This allows the user to place a list comprehension
249 all on one line.
250- Added a knob (SPLIT_BEFORE_FIRST_ARGUMENT) that encourages splitting before
251 the first element of a list of arguments or parameters if they are going to
252 be split anyway.
Bill Wendling86e51782016-05-24 00:47:44 -0700253- Added a knob (SPLIT_ARGUMENTS_WHEN_COMMA_TERMINATED) splits arguments to a
254 function if the list is terminated by a comma.
Bill Wendlinga6988c32016-05-22 18:47:11 -0700255
Bill Wendling7edb3842016-05-21 15:07:54 -0700256### Fixed
257- Don't split before a first element list argument as we would before a first
258 element function call.
Bill Wendlinge8a85692016-05-21 23:57:20 -0700259- Don't penalize when we must split a line.
Bill Wendling283f4ea2016-05-23 16:19:15 -0700260- Allow splitting before the single argument in a function call.
Bill Wendling7edb3842016-05-21 15:07:54 -0700261
Bill Wendlingd2a585d2016-05-21 00:41:24 -0700262## [0.8.2] 2016-05-21
Bill Wendling72cd2342016-05-19 01:28:58 -0700263### Fixed
264- Prefer not to split after the opening of a subscript.
Bill Wendling1e179bb2016-05-19 01:51:34 -0700265- Don't add space before the 'await' keyword if it's preceded by an opening
266 paren.
Bill Wendling4b6cead2016-05-19 11:33:38 -0700267- When we're setting the split penalty for a continuous list, we don't want to
268 mistake a comment at the end of that list as part of the list.
Bill Wendlingda6ab272016-05-19 21:45:34 -0700269- When calculating blank lines, don't assume the last seen object was a class
270 or function when we're in a class or function.
Bill Wendlingf61861d2016-05-21 00:36:27 -0700271- Don't count the closing scope when determining if the current scope is the
272 last scope on the line.
Bill Wendling72cd2342016-05-19 01:28:58 -0700273
Bill Wendlingde2c5b22016-05-18 21:10:29 -0700274## [0.8.1] 2016-05-18
Bill Wendling8f1d1402016-05-14 19:22:48 -0700275### Fixed
276- 'SPLIT_BEFORE_LOGICAL_OPERATOR' wasn't working correctly. The penalty was
277 being set incorrectly when it was part of a larger construct.
Bill Wendling99cbd562016-05-15 18:41:12 -0700278- Don't separate a keyword, like "await", from a left paren.
Bill Wendling311c0872016-05-18 01:51:12 -0700279- Don't rely upon the original tokens' line number to determine if we should
280 perform splitting in Facebook mode. The line number isn't the line number of
281 the reformatted token, but the line number where it was in the original code.
282 Instead, we need to carefully determine if the line is liabel to be split and
283 act accordingly.
Bill Wendling8f1d1402016-05-14 19:22:48 -0700284
Bill Wendlingfe7a4ac2016-05-10 23:51:57 -0700285## [0.8.0] 2016-05-10
Bill Wendling9dc79082016-05-10 00:23:53 -0700286### Added
Bill Wendling43eaa752016-05-12 01:25:20 -0700287- Add a knob, 'SPACES_AROUND_POWER_OPERATOR', to allow adding spaces around the
288 power operator.
Bill Wendling9dc79082016-05-10 00:23:53 -0700289
Bill Wendlingf015a3c2016-04-21 20:14:24 -0700290### Fixed
291- There shouldn't be a space between a decorator and an intervening comment.
Bill Wendling3e15d002016-04-28 00:16:32 -0700292- If we split before a bitwise operator, then we assume that the programmer
293 knows what they're doing, more or less, and so we enforce a split before said
294 operator if one exists in the original program.
Bill Wendlingadf1d442016-05-10 01:03:50 -0700295- Strengthen the bond between a keyword and value argument.
Bill Wendling93c42d92016-05-10 23:35:57 -0700296- Don't add a blank line after a multiline string.
Bill Wendlingcae1edd2016-05-10 23:49:19 -0700297- If the "for" part of a list comprehension can exist on the starting line
298 without going over the column limit, then let it remain there.
Bill Wendlingf015a3c2016-04-21 20:14:24 -0700299
Bill Wendling8d36eb82016-04-21 02:33:36 -0700300## [0.7.1] 2016-04-21
Bill Wendling4dc472d2016-04-10 03:03:55 -0700301### Fixed
302- Don't rewrite the file if there are no changes.
Bill Wendlingac00a252016-04-12 05:31:03 -0700303- Ensure the proper number of blank lines before an async function.
Bill Wendlingc4a49652016-04-13 13:42:43 -0700304- Split after a bitwise operator when in PEP 8 mode.
Bill Wendling423759f2016-04-14 21:14:20 -0700305- Retain the splitting within a dictionary data literal between the key and
306 value.
Bill Wendling9882f3d2016-04-21 02:29:35 -0700307- Try to keep short function calls all on one line even if they're part of a
308 larger series of tokens. This stops us from splitting too much.
Bill Wendling4dc472d2016-04-10 03:03:55 -0700309
Bill Wendlingdefe5f32016-04-09 22:29:51 -0700310## [0.7.0] 2016-04-09
Bill Wendling2e588512016-03-13 01:02:47 -0800311### Added
Bill Wendling5758e4d2016-03-19 03:38:48 -0700312- Support for Python 3.5.
313- Add 'ALLOW_MULTILINE_LAMBDAS' which allows lambdas to be formatted onto
314 multiple lines.
Bill Wendling2e588512016-03-13 01:02:47 -0800315
316### Fixed
317- Lessen penalty for splitting before a dictionary keyword.
Bill Wendling90a2aa52016-03-20 02:25:13 -0700318- Formatting of trailing comments on disabled formatting lines.
Bill Wendling2064d882016-04-09 22:21:15 -0700319- Disable / enable formatting at end of multi-line comment.
Bill Wendling2e588512016-03-13 01:02:47 -0800320
Bill Wendling0bca2aa2016-03-06 20:44:14 -0800321## [0.6.3] 2016-03-06
322### Changed
323- Documentation updated.
324
Bill Wendling95e47b92015-11-04 22:58:30 -0800325### Fixed
326- Fix spacing of multiline comments when formatting is disabled.
327
Bill Wendling9ffd8152015-11-01 17:49:25 -0800328## [0.6.2] 2015-11-01
Bill Wendling6e8ca7b2015-10-25 01:16:43 -0700329### Changed
330- Look at the 'setup.cfg' file to see if it contains style information for
331 YAPF.
Bill Wendling169790e2015-10-25 03:13:13 -0700332- Look at the '~/.config/yapf/style' file to see if it contains global style
333 information for YAPF.
Bill Wendling6e8ca7b2015-10-25 01:16:43 -0700334
Bill Wendling57ffbbb2015-10-25 00:20:14 -0700335### Fixed
336- Make lists that can fit on one line more likely to stay together.
Bill Wendling5091fa62015-10-28 01:51:53 -0700337- Correct formatting of '*args' and '**kwargs' when there are default values in
338 the argument list.
Bill Wendling57ffbbb2015-10-25 00:20:14 -0700339
Bill Wendling348b2f32015-10-24 03:20:10 -0700340## [0.6.1] 2015-10-24
Bill Wendling3a3cb6d2015-10-20 13:40:27 -0700341### Fixed
342- Make sure to align comments in data literals correctly. Also make sure we
343 don't count a "#." in a string as an i18n comment.
Bill Wendlinga6b57a62015-10-20 13:57:52 -0700344- Retain proper vertical spacing before comments in a data literal.
Bill Wendling843e48c2015-10-20 16:53:08 -0700345- Make sure that continuations from a compound statement are distinguished from
346 the succeeding line.
Bill Wendling81e37b62015-10-21 13:18:29 -0700347- Ignore preceding comments when calculating what is a "dictonary maker".
Bill Wendlinga5585722015-10-21 15:32:22 -0700348- Add a small penalty for splitting before a closing bracket.
Bill Wendlingdbcf3422015-10-21 22:11:15 -0700349- Ensure that a space is enforced after we remove a pseudo-paren that's between
350 two names, keywords, numbers, etc.
Bill Wendlingf8856722015-10-21 23:53:29 -0700351- Increase the penalty for splitting after a pseudo-paren. This could lead to
352 less readable code in some circumstances.
Bill Wendling3a3cb6d2015-10-20 13:40:27 -0700353
Bill Wendling7ef492b2015-10-18 14:43:06 -0700354## [0.6.0] 2015-10-18
Bill Wendlinga5cef8e2015-10-15 21:42:03 -0700355### Added
356- Add knob to indent the dictionary value if there is a split before it.
357
Bill Wendlingcec66962015-10-17 04:08:23 -0700358### Changed
359- No longer check that a file is a "Python" file unless the '--recursive' flag
360 is specified.
361- No longer allow the user to specify a directory unless the '--recursive' flag
362 is specified.
363
Bill Wendlingc87690c2015-10-11 16:45:21 -0700364### Fixed
365- When determining if we should split a dictionary's value to a new line, use
366 the longest entry instead of the total dictionary's length. This allows the
367 formatter to reformat the dictionary in a more consistent manner.
Bill Wendling0946c0f2015-10-12 00:42:30 -0700368- Improve how list comprehensions are formatted. Make splitting dependent upon
369 whether the "comp_for" or "comp_if" goes over the column limit.
Bill Wendling43bdc7b2015-10-12 14:25:30 -0700370- Don't over indent if expression hanging indents if we expect to dedent the
371 closing bracket.
Bill Wendlingc1052c62015-10-15 03:12:28 -0700372- Improve splitting heuristic when the first argument to a function call is
373 itself a function call with arguments. In cases like this, the remaining
374 arguments to the function call would look badly aligned, even though they are
375 techincally correct (the best kind of correct!).
Bill Wendlingb1037b52015-10-15 22:38:19 -0700376- Improve splitting heuristic more so that if the first argument to a function
377 call is a data literal that will go over the column limit, then we want to
378 split before it.
Bill Wendling8d8f5122015-10-16 11:46:23 -0700379- Remove spaces around '**' operator.
Bill Wendlingf8325e62015-10-16 15:38:54 -0700380- Retain formatting of comments in the middle of an expression.
Bill Wendling454cef62015-10-18 03:49:03 -0700381- Don't add a newline to an empty file.
Bill Wendling7ef492b2015-10-18 14:43:06 -0700382- Over indent a function's parameter list if it's not distinguished from the
383 body of the function.
Bill Wendlingc87690c2015-10-11 16:45:21 -0700384
Bill Wendling2aff7fc2015-10-11 14:08:10 -0700385## [0.5.0] 2015-10-11
Bill Wendlingd03c99f2015-10-08 21:06:07 -0700386### Added
387- Add option to exclude files/directories from formatting.
Bill Wendling5c608732015-10-10 23:39:16 -0700388- Add a knob to control whether import names are split after the first '('.
Bill Wendlingd03c99f2015-10-08 21:06:07 -0700389
Bill Wendlinga7e3f502015-10-08 00:23:40 -0700390### Fixed
391- Indent the continuation of an if-then statement when it's not distinguished
392 from the body of the if-then.
Bill Wendling1ce18c72015-10-10 23:12:16 -0700393- Allow for sensible splitting of array indices where appropriate.
Bill Wendlingbe974d82015-10-11 01:04:00 -0700394- Prefer to not split before the ending bracket of an atom. This produces
395 better code in most cases.
Bill Wendlingbbd148c2015-10-11 01:45:24 -0700396- Corrected how horizontal spaces were presevered in a disabled region.
Bill Wendlinga7e3f502015-10-08 00:23:40 -0700397
Bill Wendling967c3b22015-10-07 22:20:18 -0700398## [0.4.0] 2015-10-07
Ɓukasz Langa94089872015-09-22 16:02:26 -0700399### Added
400- Support for dedenting closing brackets, "facebook" style.
401
Bill Wendling25c8e602015-10-04 20:48:35 -0700402### Fixed
403- Formatting of tokens after a multiline string didn't retain their horizontal
404 spacing.
405
Bill Wendling06865ab2015-09-30 01:25:47 -0700406## [0.3.1] 2015-09-30
407### Fixed
408- Format closing scope bracket correctly when indentation size changes.
409
Bill Wendlinga690a622015-09-20 12:38:50 -0700410## [0.3.0] 2015-09-20
411### Added
412- Return a 2 if the source changed, 1 on error, and 0 for no change.
413
414### Fixed
415- Make sure we format if the "lines" specified are in the middle of a
416 statement.
417
Bill Wendling9adfa0c2015-09-13 05:37:30 -0700418## [0.2.9] - 2015-09-13
419### Fixed
420- Formatting of multiple files. It was halting after formatting the first file.
421
Bill Wendlingdcafd5f2015-09-12 15:26:03 -0700422## [0.2.8] - 2015-09-12
423### Added
424- Return a non-zero exit code if the source was changed.
425- Add bitwise operator splitting penalty and prefer to split before bitwise
426 operators.
427
428### Fixed
429- Retain vertical spacing between disabled and enabled lines.
430- Split only at start of named assign.
431- Retain comment position when formatting is disabled.
432- Honor splitting before or after logical ops.