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

Use black code formatter #41

Closed
5 tasks done
b2m opened this issue Oct 30, 2020 · 4 comments
Closed
5 tasks done

Use black code formatter #41

b2m opened this issue Oct 30, 2020 · 4 comments
Assignees
Milestone

Comments

@b2m
Copy link
Contributor

b2m commented Oct 30, 2020

Joking aside, I think I'll just use the black code formatter in the future, reasonable results and no more arguing about bike sheds... eh code formatting.

Originally posted by @mikegerber in #37 (comment)

Note: black requires Python >= 3.6!

Todo:

@mikegerber
Copy link
Member

I'm contemplating to not reformat the code base but just require it for new changes. Mainly because GitHub does not allow to ignore a pure reformat commit.

@b2m
Copy link
Contributor Author

b2m commented Nov 9, 2020

I'm contemplating to not reformat the code base but just require it for new changes. Mainly because GitHub does not allow to ignore a pure reformat commit.

As the most code is written by you this should be a non issue and I would guess the other contributors will aggree =)

@mikegerber mikegerber self-assigned this Nov 19, 2020
@mikegerber mikegerber added this to the 1.0 milestone Mar 2, 2023
@mikegerber mikegerber mentioned this issue Mar 2, 2023
2 tasks
@mikegerber
Copy link
Member

Reviewng this to close the issue. Only small inconsistency now that I use pre-commit:

        sys.argv[1:] = (
            args  # XXX Hack to satisfy ocrd_cli_wrap_processor() check for arguments                        
        )   

This gets formatted differently by pre-commit's black vs. black. Didn't bother to check the configuration and just moved the comment outside the parens - it was bad style anyway.

@mikegerber
Copy link
Member

README-DEV.md has info about pre-commit, and .editorconfig is in place. That should do it IMO, as I don't want to make it mandatory.

This issue was closed.
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