From 772923e207582f4983aaf77e3b55ae1f6974b994 Mon Sep 17 00:00:00 2001 From: Xintao Date: Mon, 27 Sep 2021 15:35:37 +0800 Subject: [PATCH] add codespell to pre-commit hook --- .pre-commit-config.yaml | 6 ++++++ setup.cfg | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 03cd47c..d221d29 100644 --- a/.pre-commit-config.yaml +++ b/.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 diff --git a/setup.cfg b/setup.cfg index 50ceaf0..16aa0f9 100644 --- a/setup.cfg +++ b/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