Skip to content

On Windows, spurious ^M characters are added to Unix formatted files #115

@rasa

Description

@rasa

Our team uses a .gitattributes file of

* -text  

This means files checked out on Windows will often contain only Unix line endings: just ^Js (LF), and no ^Ms (CRs).

But when these files are reformatted using pydocstringformatter, the modified lines now end in ^M^J, but only those lines.

Perhaps pydocstringformatter can sense the line ending characters of the lines it's modifying, and use them instead of introducing ^Ms where none were there previously?

I think this a better solution than adding a config option, but a config option would be nice too, to be explicit.

If there's interest, I can try to cobble a PR, that accomplishes this task.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions