Skip to content

Commit

Permalink
feat: add ruff pre-commit hook for format and lint (#36)
Browse files Browse the repository at this point in the history
This PR adds the ruff pre-commit hook for format and lint.
  • Loading branch information
sanjibansg authored Dec 6, 2023
1 parent 4e33cbb commit de03b0c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ci:
autofix_commit_msg: "style: [pre-commit.ci] autofix"
autoupdate_commit_msg: "chore(deps): [pre-commit.ci] autoupdate"

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ channels:
dependencies:
- buf
- pip
- pre-commit
- protobuf = 3.20.1 # protobuf==3.20 C extensions aren't compatible with 3.19.4
- protoletariat >= 2.0.0
- pytest >= 7.0.0
Expand Down

0 comments on commit de03b0c

Please sign in to comment.