-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add ruff to pre-commit and replace black action with pre-commit
- Loading branch information
1 parent
8e348b2
commit 2ae9e0d
Showing
3 changed files
with
41 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
name: Lint | ||
# Deprecated: use pre-commit instead | ||
# name: Lint | ||
|
||
on: [push, pull_request] | ||
# on: [push, pull_request] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: psf/black@stable | ||
# jobs: | ||
# lint: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: psf/black@stable |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: pre-commit | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v3 | ||
- uses: pre-commit/[email protected] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.7.0 | ||
hooks: | ||
- id: black | ||
# It is recommended to specify the latest version of Python | ||
# supported by your project here, or alternatively use | ||
# pre-commit's default_language_version, see | ||
# https://pre-commit.com/#top_level-default_language_version | ||
language_version: python3.12 | ||
# - repo: https://github.com/psf/black | ||
# rev: 23.7.0 | ||
# hooks: | ||
# - id: black | ||
# # It is recommended to specify the latest version of Python | ||
# # supported by your project here, or alternatively use | ||
# # pre-commit's default_language_version, see | ||
# # https://pre-commit.com/#top_level-default_language_version | ||
# language_version: python3.12 | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.6.2 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
# don't autofix by default, this runs in CI | ||
# to run fix locally, use `ruff check src/ --fix` | ||
# args: [ --fix ] | ||
# Run the formatter. | ||
- id: ruff-format |