-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0.12.2! Minor lines_strip_indent semantic change.
A minor semantic change to lines_strip_indent: when it encounters a whitespace-only line, it clips the line to *trailing* in the LineInfo object. It used to clip such lines to *leading*. But this changed LineInfo.column_number in a nonsensical way. This behavior is policy going forward: if a lines modifer function ever clips the entire line, it must clip it to *trailing* rather than *leading*. It shouldn't matter one way or another, as whitespace-only lines arguably shouldn't have any explicit semantics. But it makes intuitive sense to me that their empty line should be at column number 1, rather than 9 or 13 or whatnot. (Especially considering that with lines_strip_indent their indent value is synthetic anyway, inferred by looking ahead.) Also, a major cleanup to the lines modifier test suites.
- Loading branch information
1 parent
482ee60
commit 1f08242
Showing
4 changed files
with
357 additions
and
397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,4 +30,4 @@ | |
THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
""" | ||
|
||
__version__ = "0.12.1" | ||
__version__ = "0.12.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.