-
Notifications
You must be signed in to change notification settings - Fork 48
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
Setup black and ruff linter check #42
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe changes made to the workflow file in the GitHub actions directory primarily involve renaming the workflow and adding a new step for code formatting check using the "black" Python package. Changes
Poem
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (1)
- .github/workflows/check.yml (2 hunks)
Additional comments: 1
.github/workflows/check.yml (1)
- 1-12: The workflow is triggered on both push and pull request events on the main branch. The job runs on an Ubuntu 20.04 runner and checks out the code using the
actions/checkout@v3
action. This is a standard setup for a GitHub Actions workflow.
run: | | ||
pip install ruff | ||
ruff check . | ||
- name: black | ||
run: | | ||
pip install black | ||
black --check . |
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.
The workflow installs and runs two linters: ruff
and black
. Both linters are installed and run in separate steps, which is a good practice as it isolates the execution of each linter. However, consider using a Python dependency management tool like pipenv
or poetry
to manage these dependencies. This can help to ensure that the correct versions of the linters are always used.
run: |
pip install ruff
ruff check .
- name: black
run: |
- pip install black
+ pip install poetry
+ poetry add black
black --check .
Commitable suggestion (Beta)
run: | | |
pip install ruff | |
ruff check . | |
- name: black | |
run: | | |
pip install black | |
black --check . | |
run: | | |
pip install ruff | |
ruff check . | |
- name: black | |
run: | | |
+ pip install poetry | |
+ poetry add black | |
black --check . |
Summary by CodeRabbit
Style:
These changes will not directly impact end-users but will enhance the code quality and maintainability for developers.