From 2b2fbe886bc52b7dbcf8db676bb9206e255639a0 Mon Sep 17 00:00:00 2001 From: LeoXing1996 Date: Tue, 29 Aug 2023 11:30:51 +0800 Subject: [PATCH] update flake8 checking config in setup.cfg --- .../configs/eg3d/eg3d_cvt-official-rgb_afhq-512x512.py | 2 +- .../configs/eg3d/eg3d_cvt-official-rgb_ffhq-512x512.py | 2 +- .../eg3d/eg3d_cvt-official-rgb_shapenet-128x128.py | 2 +- setup.cfg | 10 ++++++++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/mmagic/configs/eg3d/eg3d_cvt-official-rgb_afhq-512x512.py b/mmagic/configs/eg3d/eg3d_cvt-official-rgb_afhq-512x512.py index 29cc7a92d0..f4012ae88b 100644 --- a/mmagic/configs/eg3d/eg3d_cvt-official-rgb_afhq-512x512.py +++ b/mmagic/configs/eg3d/eg3d_cvt-official-rgb_afhq-512x512.py @@ -15,7 +15,7 @@ from mmagic.models.editors.eg3d import EG3D, GaussianCamera, TriplaneGenerator with read_base(): - from .._base_.gen_default_runtime import * # noqa: F401,F403 + from .._base_.gen_default_runtime import * model = dict( type=EG3D, diff --git a/mmagic/configs/eg3d/eg3d_cvt-official-rgb_ffhq-512x512.py b/mmagic/configs/eg3d/eg3d_cvt-official-rgb_ffhq-512x512.py index a4ed3f7425..ca042bc79b 100644 --- a/mmagic/configs/eg3d/eg3d_cvt-official-rgb_ffhq-512x512.py +++ b/mmagic/configs/eg3d/eg3d_cvt-official-rgb_ffhq-512x512.py @@ -15,7 +15,7 @@ from mmagic.models.editors.eg3d import EG3D, GaussianCamera, TriplaneGenerator with read_base(): - from .._base_.gen_default_runtime import * # noqa: F401,F403 + from .._base_.gen_default_runtime import * model = dict( type=EG3D, diff --git a/mmagic/configs/eg3d/eg3d_cvt-official-rgb_shapenet-128x128.py b/mmagic/configs/eg3d/eg3d_cvt-official-rgb_shapenet-128x128.py index 97a768e54b..93bf2a4a8c 100644 --- a/mmagic/configs/eg3d/eg3d_cvt-official-rgb_shapenet-128x128.py +++ b/mmagic/configs/eg3d/eg3d_cvt-official-rgb_shapenet-128x128.py @@ -15,7 +15,7 @@ from mmagic.models.editors.eg3d import EG3D, TriplaneGenerator, UniformCamera with read_base(): - from .._base_.gen_default_runtime import * # noqa: F401,F403 + from .._base_.gen_default_runtime import * model = dict( type=EG3D, diff --git a/setup.cfg b/setup.cfg index d38c213a4c..597d1841ab 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,3 +22,13 @@ known_first_party = mmagic known_third_party = PIL,cv2,lmdb,mmcv,numpy,onnx,onnxruntime,packaging,pymatting,pytest,pytorch_sphinx_theme,requests,scipy,titlecase,torch,torchvision,ts no_lines_before = STDLIB,LOCALFOLDER default_section = THIRDPARTY + +[flake8] +# The E251 check is conflict with yapf in some situation. +# See https://github.com/google/yapf/issues/393 +extend-ignore = E251 +# The F401 check is wrong if the `__all__` variable is modified +# in `__init__.py` +per-file-ignores = + */__init__.py: F401 + mmagic/configs/*: F401,F403,F405