Skip to content

(🐞) Windows line endings not preserved with blackd #3255

@KotlinIsland

Description

@KotlinIsland

Describe the bug

👉 blackd --bind-port 9090 &
👉 curl -s -XPOST "localhost:9090" -d "1`r`n" -o test.py

(NOTE: I am using ` here to demonstrate a Windows moment, feel free to replace the data with -d 1\r\n if you are using a shell like fish or something)

test.py contents are now 1\n instead of the expected 1\r\n

Environment

  • Black's version: 22.8.0
  • OS and Python version: Windows 10 python 3.10.6

Additional context

PR adding support for this #288

Metadata

Metadata

Assignees

No one assigned

    Labels

    T: bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions