Skip to content
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

Write unchanged content to stdout when excluding formating from stdin #4610

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sacereda
Copy link

Description

This change tries to fix #4609, so you can use black piping stdin and expect the new content in the output, formatted or not. This is the way other formatters such as ruff or clang-format works too.

I'm not really sure if this is the best place to output the content, feel free to modify or make any suggestion.

Checklist - did you ...

  • Add an entry in CHANGES.md if necessary?
  • Add / update tests if necessary?
  • Add new / update outdated documentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trying to read from stdin dumps no content when stdin-filename is excluded
1 participant