[FIX] get_requirements: add --line_ending argument#98
[FIX] get_requirements: add --line_ending argument#98ramiadavid wants to merge 2 commits intoacsone:masterfrom
Conversation
|
Thanks for this PR. Can you elaborate a little bit the problem you are trying to resolve? |
|
When I run pre-commit on windows it creates the requirements.txt (overwriting existing file) with |
|
Ok. For the sake of simplicity, I think we can use LF unconditionally. If anyone later needs the configurability, it can be added with proper tests and documentation (taking inspiration from pip-tools Could you make the change, and also add a |
|
Done |
I have added the
--line_endingargument to avoid differences when running on Windows or Linux, by default Python uses'\n'for Linux and'\r\n'for Windows and this causes problems when running on pre-commit.Options:
cr(\r) | lf(\n) | crlf(\r\n)Default:
lf