Add precommit in workflow to standardize code style
See original GitHub issueThis is not a function but more like coding/contributing related.
I know now quite many open source projects add black
for instance in their pre-commit pipeline to kind of standardize the code style. I tried to black
several files and found some look more ‘pretty’. Not sure if it is something Koalas wants to have as well.
If you like it, I would be happy to work on this.
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (11 by maintainers)
Top Results From Across the Web
Supported hooks - pre-commit
python-import-sorter - This hook sorts python imports. github.com/MarketSquare/robotframework-tidy. robotidy - RobotFramework source code formatter. github.com/ ...
Read more >How To Automate Your Coding Style With Pre-Commit
Automate the coding-style We will delegate this to pre-commit and focus more on the code features using the following pre-commit hooks : Black...
Read more >Python Code Formatting Made Simple With Git Pre-commit ...
The .pre-commit-config.yaml file holds all the configurations your project requires. This is where you tell pre-commit what actions it needs to ...
Read more >Using pre-commit git hooks to automate code checks - Eric J. Ma
Git hooks are an awesome way to automate checks on your codebase locally before committing them to your code repository. That said, setting...
Read more >Automating dbt Development Workflows with Pre-commit
The second workflow we'll add is YAML linting via YAMLLint. This will automatically check our modified files to ensure that our YAML standards,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Oh, almost all files changed. We definitely shouldn’t do in one PR. haha
yeah, pandas started using black quite a while ago, and it was the initial reason to propose this here @deepyaman
@HyukjinKwon FYI, I recall that pandas first applied black for batches of files first (so several PRs for reformatting), and then in the meantime add black as part of linting check in CI, so CI won’t pass if users do not black their PR or if the current codebase have codes incompatible with black, and then merge it and black the rest of code alongside (so need to keep rebasing).
It is pretty much alike the PR @deepyaman has, but maybe with several pre-cursor PRs for reformatting first could make this one smaller and easier to review.