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

Difference with the official 'psf/black@stable' action #10

Open
rickstaa opened this issue Feb 18, 2022 · 1 comment
Open

Difference with the official 'psf/black@stable' action #10

rickstaa opened this issue Feb 18, 2022 · 1 comment

Comments

@rickstaa
Copy link
Owner

rickstaa commented Feb 18, 2022

Now that psf/black#1909 and psf/black#1940 have been merged this action is not trivial anymore. Below I, therefore, documented the difference between this action and the official black action.

ricks/action-black psf/black
Action type docker composite
fail_on_error argument
is_formatted output var
specify black version
@LLyaudet
Copy link

Hello,
Re
What is the goal of the feature fail_on_error ?
By default, psf/black will return the error code of black process unmodified https://github.com/psf/black/blob/e7fb048281a83733f0b162fc7fa85e48044ea9ec/action/main.py#L181.
And by default you will not return an error code https://github.com/rickstaa/action-black/blob/b1c43752f86fe75a86904bb2feeea8661c58a017/entrypoint.sh#L95C1-L97C3.
But you can simply ignore return code in calling context.
You need less than one or two hours to make the code, test it and submit a PR.
Since I'm slightly paranoïd, it appears to me like bread crumbs for someone else to add a pull request that hides error codes by default.
But I may be wrong.
Best regards,
Laurent Lyaudet

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

No branches or pull requests

2 participants