question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add precommit in workflow to standardize code style

See original GitHub issue

This 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:closed
  • Created 4 years ago
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
ueshincommented, Sep 6, 2019

Oh, almost all files changed. We definitely shouldn’t do in one PR. haha

0reactions
charlesdong1991commented, Feb 20, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found