-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/correct behavior on trailling cr #65
Conversation
Trailing return (CR, ) should not be recognized as a trailing newline
change variable name to avoid conflict with builtin
Coverage Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like checking for ending with "\r" was done in response to a real world example I had, but I can't remember specifically, and I just tested 482 sample files I used way back when and didn't find any like that so... I'll somewhat hesitantly accept this change in behavior (I can't think of any substantial improvement this adds other than maybe aligning with current common standards, whereas this repo's main purpose is to identify deviations from any current standard and fix them).
NB: Consider translating as many attributes as possible from those 482 datasets as possible into unit tests, so we don't need to rely on manual checks. Attributes being quirks specific to those files |
This is for-the-most-part done already in the many unit tests in this repo that do exactly that. I consider this repo the most critical in terms of allowing us to adapt to many of the weird things we've encountered in the wild, but also shielding us from strange or incorrectly imported portfolio data that plagued us for so long. I was searching for a real world case of something that there was a unit test for, but was removed in this PR. |
Awesome :-) |
I made a mistake in my review on #60, since
\r
should not be recognized as a trailing newline (no modern system writes files with that as the trailing character). Both the unix LF and windows CRLF line endings end with\n
.