-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Added black formater for the code with code-checker on pull #1610
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1610 +/- ##
======================================
Coverage 86% 86%
======================================
Files 75 75
Lines 4705 4705
======================================
Hits 4064 4064
Misses 641 641 |
May I point you to the transformers library for inspiration/guidance? Their setup.cfg configures this with If your PR doesn't match, you just quickly run the |
|
I can move it to setup.cfg, now I know how. I will update soon, just a few days |
Great job! =) |
This pull request is now in conflict... :( |
This pull request is now in conflict... :( |
Added throught black.toml other options are hard so far No caching for black github action Moved from black.toml to pyproject.toml Exclude not only yml but also yaml Update pyproject.toml Co-authored-by: Thomas Johansen <[email protected]> Update .github/workflows/code-formatting-check.yml mergify Remove formating check E231 error ignoring because of black formating Updated CONTRIBUTING to the master
Black skipping string normalization
Great job! =) |
Great job! =) |
so this applies black everytime we merge a PR into master? and will it only affect changed lines or always the whole file someone edits? |
So far it would do nothing. But later, after black would be applied to the whole repo, you will have to install pre-commit, so it will format the code before you commit:
Also there is github action such that on every push/pull black would check files. (It is not activated yet) So, the github action is only checking and will check all files |
The check is commented so it still optional not mandatory... |
great! will try it out |
* black Added throught black.toml other options are hard so far No caching for black github action Moved from black.toml to pyproject.toml Exclude not only yml but also yaml Update pyproject.toml Co-authored-by: Thomas Johansen <[email protected]> Update .github/workflows/code-formatting-check.yml mergify Remove formating check E231 error ignoring because of black formating Updated CONTRIBUTING to the master * Update .github/workflows/code-formatting-check.yml * Bump black to 19.10b0 version * resolved incorrect merge of CONTRIBUTING, Black skipping string normalization * Minor fixes in CONTRIBUTING, two typos * Update setup.cfg * chlog Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Jirka <[email protected]>
Before submitting
What does this PR do?
Fixes # (issue).
As discussed in slack, this is a pr for adding black with github actions.
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃