Browse Source

add codespell to pre-commit hook

Xintao 3 years ago
parent
commit
772923e207
2 changed files with 11 additions and 0 deletions
  1. 6 0
      .pre-commit-config.yaml
  2. 5 0
      setup.cfg

+ 6 - 0
.pre-commit-config.yaml

@@ -24,6 +24,12 @@ repos:
     hooks:
       - id: yapf
 
+  # codespell
+  - repo: https://github.com/codespell-project/codespell
+    rev: v2.1.0
+    hooks:
+      - id: codespell
+
   # pre-commit-hooks
   - repo: https://github.com/pre-commit/pre-commit-hooks
     rev: v3.2.0

+ 5 - 0
setup.cfg

@@ -20,3 +20,8 @@ known_first_party = realesrgan
 known_third_party = PIL,basicsr,cv2,numpy,torch,torchvision,tqdm
 no_lines_before = STDLIB,LOCALFOLDER
 default_section = THIRDPARTY
+
+[codespell]
+skip = .git,./docs/build
+count =
+quiet-level = 3