This repository was archived by the owner on Nov 1, 2024. It is now read-only.
pre-commit hook for black and flake8#76
Closed
dtemir wants to merge 2 commits intofacebookresearch:mainfrom
dtemir:pre-commit-hooks
Closed
pre-commit hook for black and flake8#76dtemir wants to merge 2 commits intofacebookresearch:mainfrom dtemir:pre-commit-hooks
dtemir wants to merge 2 commits intofacebookresearch:mainfrom
dtemir:pre-commit-hooks
Conversation
Contributor
Author
|
@jfResearchEng please let me know if that'd be a useful change, but feel free to close the PR if you think it's unnecessary. |
Contributor
Author
|
One more idea: Install pre-commit: pip install pre-commitInstall the git hooks script: pre-commit installIt uses a file called Apply the hook to all files: pre-commit run --all-filesTo level everything up first |
| **Install the git hooks script**: | ||
|
|
||
| ```bash | ||
| pre-commit install |
Contributor
There was a problem hiding this comment.
When testing with mac, the following error appears: "pre-commit not found"
The error can be fixed using: pre-commit/pre-commit#1537
jfResearchEng
suggested changes
Apr 19, 2022
Contributor
jfResearchEng
left a comment
There was a problem hiding this comment.
Shall a common error session be added for an improvement for mac users.
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I think it would be a good idea to standardize the code contributed to LabGraph by having contributors use
pre-commithook that will automatically runblackandflake8when the user makes a commit.That way as users keep committing changes, the new code will automatically follow good standards.
Fixes #74
Type of change
Please delete options that are not relevant.
Checklist: