diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index c408d46..89318e4 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -20,10 +20,11 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 yapf isort + pip install codespell flake8 isort yapf - name: Lint run: | + codespell flake8 . isort --check-only --diff gfpgan/ scripts/ inference_gfpgan.py setup.py yapf -r -d gfpgan/ scripts/ inference_gfpgan.py setup.py 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/gfpgan/archs/gfpganv1_arch.py b/gfpgan/archs/gfpganv1_arch.py index 98966ab..55f9abe 100644 --- a/gfpgan/archs/gfpganv1_arch.py +++ b/gfpgan/archs/gfpganv1_arch.py @@ -20,7 +20,7 @@ class StyleGAN2GeneratorSFT(StyleGAN2Generator): StyleGAN2. Default: 2. resample_kernel (list[int]): A list indicating the 1D resample kernel magnitude. A cross production will be applied to extent 1D resample - kenrel to 2D resample kernel. Default: [1, 3, 3, 1]. + kernel to 2D resample kernel. Default: [1, 3, 3, 1]. lr_mlp (float): Learning rate multiplier for mlp layers. Default: 0.01. """ diff --git a/setup.cfg b/setup.cfg index 628b31c..826aafc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,3 +20,8 @@ known_first_party = gfpgan known_third_party = basicsr,cv2,facexlib,numpy,torch,torchvision,tqdm no_lines_before = STDLIB,LOCALFOLDER default_section = THIRDPARTY + +[codespell] +skip = .git,./docs/build +count = +quiet-level = 3