Skip to content

Commit

Permalink
[lint] use pre-commit to auto check and lint (#242)
Browse files Browse the repository at this point in the history
* [lint] use pre-commit to auto check and lint

* [lint] use pre-commit to auto check and lint

---------

Co-authored-by: user01 <user01@user01deMacBook-Pro.local>
Co-authored-by: user01 <user01@192.168.0.106>
  • Loading branch information
3 people authored Dec 6, 2023
1 parent 80b3acd commit 3afff44
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-yapf
rev: 'v0.32.0'
hooks:
- id: yapf
- repo: https://github.com/pycqa/flake8
rev: '3.8.2'
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v17.0.6'
hooks:
- id: clang-format
- repo: https://github.com/cpplint/cpplint
rev: '1.6.1'
hooks:
- id: cpplint
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ conda create -n wespeaker python=3.9
conda activate wespeaker
conda install pytorch=1.12.1 torchaudio=0.12.1 cudatoolkit=11.3 -c pytorch -c conda-forge
pip install -r requirements.txt
pre-commit install # for clean and tidy code
```

## 🔥 News
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ onnxruntime
soundfile==0.10.3.post1
pypeln==0.4.9
silero-vad @ git+https://github.com/pengzhendong/silero-vad.git
pre-commit==3.5.0

0 comments on commit 3afff44

Please sign in to comment.