Configure flake8 and yapf with pre-commit#215
Conversation
| exclude: '^$' | ||
| fail_fast: true | ||
| repos: | ||
| - repo: https://github.com/pre-commit/mirrors-yapf |
There was a problem hiding this comment.
This does not seem to be v. actively used and maintained, what do you think about enabling without mirror?
There was a problem hiding this comment.
This does not seem to be v. actively used and maintained
I am curious how did you decide this?
I see https://github.com/pre-commit/mirrors-yapf is updated whenever yapf(https://github.com/google/yapf/releases) is updated as you can see here https://github.com/pre-commit/mirrors-yapf/releases
what do you think about enabling without mirror
- We need to provide git repository to enable pre-commit hooks (Ref: http://pre-commit.com/#plugins)
- So What you mean by without mirror?
There was a problem hiding this comment.
This does not seem to be v. actively used and maintained
I am curious how did you decide this?
I see https://github.com/pre-commit/mirrors-yapf is updated whenever yapf(https://github.com/google/yapf/releases) is updated as you can see here https://github.com/pre-commit/mirrors-yapf/releases
Thanks for linking this, my observation was 👎 skipped over 53 releases. 👍
what do you think about enabling without mirror
We need to provide git repository to enable pre-commit hooks (Ref: http://pre-commit.com/#plugins)
o w/ the number of releases they had, don't need this.
So What you mean by without mirror?
☝️ what you understood, a fork of our own or code to enable a pre-commit hook.
| ``` | ||
|
|
||
| 1. Run the app | ||
| ```bash |
There was a problem hiding this comment.
thanks for this cleanup! 🎉 I was planning to do this from quite a while but didn't.
| # A continuation line is under-indented for a visual indentation. | ||
| E128 | ||
|
|
||
| max-line-length=80 No newline at end of file |
There was a problem hiding this comment.
..and moving it to separate dotfile is perfect!
tapaswenipathak
left a comment
There was a problem hiding this comment.
Thanks for suggesting and than working on this, left a comment otherwise it is 🚀
| cd oshc | ||
| ``` | ||
|
|
||
| 1. Install [pre-commit](pre-commit.com) into your git hooks. [pre-commit](pre-commit.com) will now run on every commit. Every time you clone a project that is using [pre-commit](pre-commit.com) running [pre-commit](pre-commit.com) install should always be the first thing you do after installing requirements. |
There was a problem hiding this comment.
in markdown it takes relative path if not put w/ the protocol, need a correction here.
There was a problem hiding this comment.
oh, I missed protocol in URL somehow during copy-paste or maybe my editor removed them.
It seems you fixed it after merging, thanks.
Checklist
developbranch.Which issue does this PR fix?:
fixes #130
Why do we need this PR?:
To ensure that all the code we write follows the standard convention.
What is the new behavior?
flake8andyapfare run for everygit commit.Readmeon how to installpre-commithooks.travis.ymlto run all precommit-hooks on changed filesTesting instructions:
yapfwill make changes in place so add changed files to staging again and run git commit agin.