You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--code is supposed to take the code as an input string
--check is supposed to change the exit code based on whether edits were made while formatting
--diff is supposed to only output a diff, instead of the entire formatted source
What I found was the the --check and --diff flags did not work when passing input using --code; it behaved as if the extra flags hadn't been passed at all.
To Reproduce Steps to reproduce the behavior:
Run this command (notice the double space after =):
black --check --code 'a = 5'
The command exits with a status 0, despite making edits (removing the double space).
Expected behavior The command should have exited with a status of 1, since edits were made.
Environment (please complete the following information):
Version: 20.8b1
OS and Python version: Arch Linux/Python 3.8.6
The text was updated successfully, but these errors were encountered:
Describe the bug
--code
is supposed to take the code as an input string--check
is supposed to change the exit code based on whether edits were made while formatting--diff
is supposed to only output a diff, instead of the entire formatted sourceWhat I found was the the
--check
and--diff
flags did not work when passing input using--code
; it behaved as if the extra flags hadn't been passed at all.To Reproduce Steps to reproduce the behavior:
=
):black --check --code 'a = 5'
0
, despite making edits (removing the double space).Expected behavior The command should have exited with a status of
1
, since edits were made.Environment (please complete the following information):
20.8b1
The text was updated successfully, but these errors were encountered: