-
Notifications
You must be signed in to change notification settings - Fork 986
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
build: Add flake8 and black to pre-commit hooks #3578
Conversation
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
Need to update based on 6e88700 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just got a issue with black lint on odh:
https://github.com/opendatahub-io/kserve/actions/runs/8573660036/job/23498794321?pr=289
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
@@ -28,9 +28,8 @@ jobs: | |||
- name: Lint with flake8 | |||
uses: py-actions/flake8@v2 | |||
with: | |||
args: "--config python/.flake8" | |||
args: "--config .flake8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved .flake8 file to top level to work with pre-commit
I believe it is a good thing to add the |
Good idea but I think it should only be recommended but not required. I can submit a PR to the website later. |
/lgtm |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lizzzcai, sivanantha321, spolti, terrytangyuan, yuzisun The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* build: Add flake8 and black to pre-commit hooks Signed-off-by: Yuan Tang <terrytangyuan@gmail.com> * fix path Signed-off-by: Yuan Tang <terrytangyuan@gmail.com> * pass config Signed-off-by: Yuan Tang <terrytangyuan@gmail.com> * fix flake8 Signed-off-by: Yuan Tang <terrytangyuan@gmail.com> --------- Signed-off-by: Yuan Tang <terrytangyuan@gmail.com> Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>
For local development, these checks would run automatically when committing changes and we can easily add additional checks/hooks.