Skip to content

Commit

Permalink
add codespell
Browse files Browse the repository at this point in the history
  • Loading branch information
xinntao committed Sep 27, 2021
1 parent e5adc0d commit 69bcfff
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gfpgan/archs/gfpganv1_arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""

Expand Down
5 changes: 5 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 69bcfff

Please sign in to comment.