Daira-Emma Hopwood
Daira-Emma Hopwood
As I pointed out, setting `os.linesep` (as an option, say `--linesep=unix` or `--linesep=windows`) may be sufficient to make the existing implementation do what we want. [Edit: the monkey-patch below is...
I think this should work (untested): ``` from lib2to3 import refactor def _identity(obj): return obj refactor._from_system_newlines = _identity refactor._to_system_newlines = _identity if sys.version_info >= (3, 0): # Force newline mode...
Hmm, not sure that will do the right thing on Windows for lines created by a fixer, though.
I used the [os.linesep approach](https://github.com/python-modernize/python-modernize/issues/121#issuecomment-149031962) for the pull request. I believe this should also work on Python 3 based on the API docs; we'll see what Travis says.
Nope, setting `os.linesep` doesn't work on Python 3, despite the docs implying that it should. I've run out of time to work on this now; perhaps someone else can have...
I had another idea. Fixed now -- please review.
Hmm, although the approach I used in #132 works, subclassing `RefactoringTool` has the advantage that we can also log which files changed, as needed for #127. So I'm leaning toward...
I think we should use something like the auto-detection method in @techtonik's patch, rather than the `-line-endings` options. (@techtonik makes a good argument that they look like fixer options and...
Actually it looks as though I won't have time to do this before I go on holiday on Thursday (until the 28th November). So someone else should probably look at...
Re: peer review, yous know that it usually doesn't check proofs, right? (And peer reviewers are explicitly not required to even look at "supplementary information", which the proofs are forced...