From a9d87ae007aabf68c2cef0f7828fed4b56ca92fa Mon Sep 17 00:00:00 2001 From: torzdf <36920800+torzdf@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:03:54 +0100 Subject: [PATCH] linting: Remove pylint hint for logger --- .pylintrc | 2 +- lib/align/aligned_face.py | 2 +- lib/align/alignments.py | 2 +- lib/align/detected_face.py | 2 +- lib/cli/args.py | 2 +- lib/cli/launcher.py | 2 +- lib/config.py | 2 +- lib/convert.py | 2 +- lib/gui/_config.py | 2 +- lib/gui/analysis/event_reader.py | 2 +- lib/gui/analysis/stats.py | 2 +- lib/gui/command.py | 2 +- lib/gui/control_helper.py | 2 +- lib/gui/custom_widgets.py | 2 +- lib/gui/display.py | 2 +- lib/gui/display_analysis.py | 2 +- lib/gui/display_command.py | 2 +- lib/gui/display_page.py | 2 +- lib/gui/menu.py | 2 +- lib/gui/options.py | 2 +- lib/gui/popup_configure.py | 2 +- lib/gui/popup_session.py | 2 +- lib/gui/project.py | 2 +- lib/gui/theme.py | 2 +- lib/gui/utils/config.py | 2 +- lib/gui/utils/file_handler.py | 2 +- lib/gui/utils/image.py | 2 +- lib/gui/utils/misc.py | 2 +- lib/gui/wrapper.py | 2 +- lib/image.py | 2 +- lib/model/backup_restore.py | 2 +- lib/model/initializers.py | 2 +- lib/model/nn_blocks.py | 2 +- lib/model/session.py | 2 +- lib/multithreading.py | 2 +- lib/queue_manager.py | 2 +- lib/serializer.py | 2 +- lib/training/augmentation.py | 2 +- lib/vgg_face.py | 2 +- plugins/convert/_config.py | 2 +- plugins/convert/color/_base.py | 2 +- plugins/convert/scaling/_base.py | 2 +- plugins/convert/writer/_base.py | 2 +- plugins/extract/pipeline.py | 2 +- plugins/extract/recognition/vgg_face2.py | 2 +- plugins/plugin_loader.py | 2 +- plugins/train/model/_base/io.py | 2 +- plugins/train/model/_base/model.py | 2 +- plugins/train/model/_base/settings.py | 2 +- plugins/train/model/dfaker.py | 2 +- plugins/train/model/dfl_sae.py | 2 +- plugins/train/model/dlight.py | 2 +- plugins/train/model/phaze_a.py | 2 +- plugins/train/model/realface.py | 2 +- scripts/convert.py | 2 +- scripts/extract.py | 2 +- scripts/fsmedia.py | 2 +- scripts/gui.py | 2 +- setup.py | 2 +- tools/alignments/alignments.py | 2 +- tools/alignments/media.py | 2 +- tools/effmpeg/effmpeg.py | 2 +- tools/manual/faceviewer/frame.py | 2 +- tools/manual/faceviewer/viewport.py | 2 +- tools/manual/frameviewer/control.py | 2 +- tools/manual/frameviewer/editor/_base.py | 2 +- tools/manual/frameviewer/frame.py | 2 +- tools/manual/manual.py | 2 +- tools/model/model.py | 2 +- tools/preview/preview.py | 2 +- 70 files changed, 70 insertions(+), 70 deletions(-) diff --git a/.pylintrc b/.pylintrc index 3d669e8927..5f6e63247f 100644 --- a/.pylintrc +++ b/.pylintrc @@ -426,7 +426,7 @@ max-returns=6 max-statements=50 # Minimum number of public methods for a class (see R0903). -min-public-methods=2 +min-public-methods=1 [CLASSES] diff --git a/lib/align/aligned_face.py b/lib/align/aligned_face.py index 6f41cab106..263b03cb8f 100644 --- a/lib/align/aligned_face.py +++ b/lib/align/aligned_face.py @@ -9,7 +9,7 @@ import cv2 import numpy as np -logger = logging.getLogger(__name__) # pylint:disable=invalid-name +logger = logging.getLogger(__name__) CenteringType = T.Literal["face", "head", "legacy"] _MEAN_FACE = np.array([[0.010086, 0.106454], [0.085135, 0.038915], [0.191003, 0.018748], diff --git a/lib/align/alignments.py b/lib/align/alignments.py index d3cb13bc03..7013a7bd4c 100644 --- a/lib/align/alignments.py +++ b/lib/align/alignments.py @@ -16,7 +16,7 @@ from collections.abc import Generator from .aligned_face import CenteringType -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) _VERSION = 2.3 # VERSION TRACKING # 1.0 - Never really existed. Basically any alignments file prior to version 2.0 diff --git a/lib/align/detected_face.py b/lib/align/detected_face.py index 92e17d1dad..5cec4bfc8f 100644 --- a/lib/align/detected_face.py +++ b/lib/align/detected_face.py @@ -21,7 +21,7 @@ from collections.abc import Callable from .aligned_face import CenteringType -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class DetectedFace(): diff --git a/lib/cli/args.py b/lib/cli/args.py index 15b3377967..8193acc4a8 100644 --- a/lib/cli/args.py +++ b/lib/cli/args.py @@ -19,7 +19,7 @@ FilesFullPaths, MultiOption, Radio, SaveFileFullPaths, Slider) from .launcher import ScriptExecutor -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) _GPUS = GPUStats().cli_devices # LOCALES diff --git a/lib/cli/launcher.py b/lib/cli/launcher.py index 9dfa3c132f..4745c274d0 100644 --- a/lib/cli/launcher.py +++ b/lib/cli/launcher.py @@ -18,7 +18,7 @@ import argparse from collections.abc import Callable -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class ScriptExecutor(): # pylint:disable=too-few-public-methods diff --git a/lib/config.py b/lib/config.py index 3619166f6c..d4a2f1298b 100644 --- a/lib/config.py +++ b/lib/config.py @@ -23,7 +23,7 @@ OrderedDictSectionType = OrderedDict[str, "ConfigSection"] OrderedDictItemType = OrderedDict[str, "ConfigItem"] -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) ConfigValueType = bool | int | float | list[str] | str | None diff --git a/lib/convert.py b/lib/convert.py index a7439dcb8e..3b5c91b936 100644 --- a/lib/convert.py +++ b/lib/convert.py @@ -23,7 +23,7 @@ from plugins.convert.mask.mask_blend import Mask as MaskAdjust from plugins.convert.scaling._base import Adjustment as ScalingAdjust -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) @dataclass diff --git a/lib/gui/_config.py b/lib/gui/_config.py index 7fb1037cd8..e5a034b3f6 100644 --- a/lib/gui/_config.py +++ b/lib/gui/_config.py @@ -9,7 +9,7 @@ from lib.config import FaceswapConfig -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class Config(FaceswapConfig): diff --git a/lib/gui/analysis/event_reader.py b/lib/gui/analysis/event_reader.py index e4da91a2cf..8617150236 100644 --- a/lib/gui/analysis/event_reader.py +++ b/lib/gui/analysis/event_reader.py @@ -21,7 +21,7 @@ if T.TYPE_CHECKING: from collections.abc import Generator, Iterator -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) @dataclass diff --git a/lib/gui/analysis/stats.py b/lib/gui/analysis/stats.py index eda0e19ca2..7c6aab3d43 100644 --- a/lib/gui/analysis/stats.py +++ b/lib/gui/analysis/stats.py @@ -22,7 +22,7 @@ from .event_reader import TensorBoardLogs -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class GlobalSession(): diff --git a/lib/gui/command.py b/lib/gui/command.py index 56f4106aa6..9ac949d9c9 100644 --- a/lib/gui/command.py +++ b/lib/gui/command.py @@ -10,7 +10,7 @@ from .custom_widgets import Tooltip from .utils import get_images, get_config -logger = logging.getLogger(__name__) # pylint:disable=invalid-name +logger = logging.getLogger(__name__) # LOCALES _LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True) diff --git a/lib/gui/control_helper.py b/lib/gui/control_helper.py index 3906370081..31c8436e47 100644 --- a/lib/gui/control_helper.py +++ b/lib/gui/control_helper.py @@ -15,7 +15,7 @@ from .custom_widgets import ContextMenu, MultiOption, ToggledFrame, Tooltip from .utils import FileHandler, get_config, get_images -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) # LOCALES _LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True) diff --git a/lib/gui/custom_widgets.py b/lib/gui/custom_widgets.py index 30c73a6554..5a39abdb8c 100644 --- a/lib/gui/custom_widgets.py +++ b/lib/gui/custom_widgets.py @@ -13,7 +13,7 @@ from .utils import get_config -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class ContextMenu(tk.Menu): # pylint: disable=too-many-ancestors diff --git a/lib/gui/display.py b/lib/gui/display.py index dbc09b8992..0d2b107f93 100644 --- a/lib/gui/display.py +++ b/lib/gui/display.py @@ -16,7 +16,7 @@ from .display_command import GraphDisplay, PreviewExtract, PreviewTrain from .utils import get_config -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) # LOCALES _LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True) diff --git a/lib/gui/display_analysis.py b/lib/gui/display_analysis.py index 682170d18d..a04ec63843 100644 --- a/lib/gui/display_analysis.py +++ b/lib/gui/display_analysis.py @@ -16,7 +16,7 @@ from .analysis import Session from .utils import FileHandler, get_config, get_images, LongRunningTask -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) # LOCALES _LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True) diff --git a/lib/gui/display_command.py b/lib/gui/display_command.py index 48d3565c41..ee2cd8231e 100644 --- a/lib/gui/display_command.py +++ b/lib/gui/display_command.py @@ -19,7 +19,7 @@ from .control_helper import set_slider_rounding from .utils import FileHandler, get_config, get_images, preview_trigger -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) # LOCALES _LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True) diff --git a/lib/gui/display_page.py b/lib/gui/display_page.py index 74eb38ff92..e6bc3eaef0 100644 --- a/lib/gui/display_page.py +++ b/lib/gui/display_page.py @@ -9,7 +9,7 @@ from .custom_widgets import Tooltip from .utils import get_images -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) # LOCALES _LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True) diff --git a/lib/gui/menu.py b/lib/gui/menu.py index 2a3026f43d..7b83af56e6 100644 --- a/lib/gui/menu.py +++ b/lib/gui/menu.py @@ -22,7 +22,7 @@ if T.TYPE_CHECKING: from scripts.gui import FaceswapGui -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) # LOCALES _LANG = gettext.translation("gui.menu", localedir="locales", fallback=True) diff --git a/lib/gui/options.py b/lib/gui/options.py index e4eaea8e27..3d1ac824ae 100644 --- a/lib/gui/options.py +++ b/lib/gui/options.py @@ -13,7 +13,7 @@ from .utils import get_images from .control_helper import ControlPanelOption -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class CliOptions(): diff --git a/lib/gui/popup_configure.py b/lib/gui/popup_configure.py index ea361a7d39..6bdb725db4 100644 --- a/lib/gui/popup_configure.py +++ b/lib/gui/popup_configure.py @@ -22,7 +22,7 @@ if T.TYPE_CHECKING: from lib.config import FaceswapConfig -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) # LOCALES _LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True) diff --git a/lib/gui/popup_session.py b/lib/gui/popup_session.py index 2d0162f02c..f145e37e52 100644 --- a/lib/gui/popup_session.py +++ b/lib/gui/popup_session.py @@ -15,7 +15,7 @@ from .analysis import Calculations, Session from .utils import FileHandler, get_images, LongRunningTask -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) # LOCALES _LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True) diff --git a/lib/gui/project.py b/lib/gui/project.py index 508890fcd2..4fd61de074 100644 --- a/lib/gui/project.py +++ b/lib/gui/project.py @@ -8,7 +8,7 @@ from lib.serializer import get_serializer -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class _GuiSession(): # pylint:disable=too-few-public-methods diff --git a/lib/gui/theme.py b/lib/gui/theme.py index 777894b370..993a906fd6 100644 --- a/lib/gui/theme.py +++ b/lib/gui/theme.py @@ -11,7 +11,7 @@ from lib.utils import FaceswapError -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class Style(): # pylint:disable=too-few-public-methods diff --git a/lib/gui/utils/config.py b/lib/gui/utils/config.py index 58e8152cee..57bd42aa33 100644 --- a/lib/gui/utils/config.py +++ b/lib/gui/utils/config.py @@ -20,7 +20,7 @@ from lib.gui.command import CommandNotebook from lib.gui.command import ToolsNotebook -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) PATHCACHE = os.path.join(os.path.realpath(os.path.dirname(sys.argv[0])), "lib", "gui", ".cache") _CONFIG: Config | None = None diff --git a/lib/gui/utils/file_handler.py b/lib/gui/utils/file_handler.py index 45ff8c5fa9..e1e687e1c6 100644 --- a/lib/gui/utils/file_handler.py +++ b/lib/gui/utils/file_handler.py @@ -6,7 +6,7 @@ from tkinter import filedialog import typing as T -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) _FILETYPE = T.Literal["default", "alignments", "config_project", "config_task", "config_all", "csv", "image", "ini", "state", "log", "video"] _HANDLETYPE = T.Literal["open", "save", "filename", "filename_multi", "save_filename", diff --git a/lib/gui/utils/image.py b/lib/gui/utils/image.py index 37eb05283c..592ee98f64 100644 --- a/lib/gui/utils/image.py +++ b/lib/gui/utils/image.py @@ -16,7 +16,7 @@ if T.TYPE_CHECKING: from collections.abc import Sequence -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) _IMAGES: "Images" | None = None _PREVIEW_TRIGGER: "PreviewTrigger" | None = None TRAININGPREVIEW = ".gui_training_preview.png" diff --git a/lib/gui/utils/misc.py b/lib/gui/utils/misc.py index 2506af3799..58a4befa98 100644 --- a/lib/gui/utils/misc.py +++ b/lib/gui/utils/misc.py @@ -16,7 +16,7 @@ from lib.multithreading import _ErrorType -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class LongRunningTask(Thread): diff --git a/lib/gui/wrapper.py b/lib/gui/wrapper.py index dfb2b82fce..84fe5459e5 100644 --- a/lib/gui/wrapper.py +++ b/lib/gui/wrapper.py @@ -20,7 +20,7 @@ if os.name == "nt": import win32console # pylint: disable=import-error -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class ProcessWrapper(): diff --git a/lib/image.py b/lib/image.py index 19e161c8ef..96685e6cb4 100644 --- a/lib/image.py +++ b/lib/image.py @@ -28,7 +28,7 @@ if T.TYPE_CHECKING: from lib.align.alignments import PNGHeaderDict -logger = logging.getLogger(__name__) # pylint:disable=invalid-name +logger = logging.getLogger(__name__) # ################### # # <<< IMAGE UTILS >>> # diff --git a/lib/model/backup_restore.py b/lib/model/backup_restore.py index 0408040b85..e143266c9e 100644 --- a/lib/model/backup_restore.py +++ b/lib/model/backup_restore.py @@ -10,7 +10,7 @@ from lib.serializer import get_serializer from lib.utils import get_folder -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class Backup(): diff --git a/lib/model/initializers.py b/lib/model/initializers.py index 8085de3e04..41f7682371 100644 --- a/lib/model/initializers.py +++ b/lib/model/initializers.py @@ -13,7 +13,7 @@ K = keras.backend -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) def compute_fans(shape, data_format='channels_last'): diff --git a/lib/model/nn_blocks.py b/lib/model/nn_blocks.py index d805332aec..63e431d33e 100644 --- a/lib/model/nn_blocks.py +++ b/lib/model/nn_blocks.py @@ -19,7 +19,7 @@ from tensorflow import Tensor -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) _CONFIG: dict = {} diff --git a/lib/model/session.py b/lib/model/session.py index 9cc1de1390..a400b2fde6 100644 --- a/lib/model/session.py +++ b/lib/model/session.py @@ -17,7 +17,7 @@ if T.TYPE_CHECKING: from collections.abc import Callable -logger = logging.getLogger(__name__) # pylint:disable=invalid-name +logger = logging.getLogger(__name__) class KSession(): diff --git a/lib/multithreading.py b/lib/multithreading.py index f324080f04..73cdc983ee 100644 --- a/lib/multithreading.py +++ b/lib/multithreading.py @@ -13,7 +13,7 @@ if T.TYPE_CHECKING: from collections.abc import Callable, Generator -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) _ErrorType: T.TypeAlias = tuple[type[BaseException], BaseException, TracebackType] | tuple[T.Any, T.Any, T.Any] | None diff --git a/lib/queue_manager.py b/lib/queue_manager.py index 7eeacc14f4..6848636bd1 100644 --- a/lib/queue_manager.py +++ b/lib/queue_manager.py @@ -10,7 +10,7 @@ from queue import Queue, Empty as QueueEmpty # pylint: disable=unused-import; # noqa from time import sleep -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class EventQueue(Queue): diff --git a/lib/serializer.py b/lib/serializer.py index 4300e95f45..a468a4401d 100644 --- a/lib/serializer.py +++ b/lib/serializer.py @@ -21,7 +21,7 @@ except ImportError: _HAS_YAML = False -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class Serializer(): diff --git a/lib/training/augmentation.py b/lib/training/augmentation.py index c559a621c1..81f56e8fed 100644 --- a/lib/training/augmentation.py +++ b/lib/training/augmentation.py @@ -15,7 +15,7 @@ if T.TYPE_CHECKING: from lib.config import ConfigValueType -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) @dataclass diff --git a/lib/vgg_face.py b/lib/vgg_face.py index 9917fbac97..d10c957df9 100644 --- a/lib/vgg_face.py +++ b/lib/vgg_face.py @@ -14,7 +14,7 @@ from lib.utils import GetModel -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class VGGFace(): diff --git a/plugins/convert/_config.py b/plugins/convert/_config.py index 5f5ad26c0f..3deb1857f4 100644 --- a/plugins/convert/_config.py +++ b/plugins/convert/_config.py @@ -6,7 +6,7 @@ from lib.config import FaceswapConfig -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class Config(FaceswapConfig): diff --git a/plugins/convert/color/_base.py b/plugins/convert/color/_base.py index 1a5c4ebd72..7f58d45ead 100644 --- a/plugins/convert/color/_base.py +++ b/plugins/convert/color/_base.py @@ -6,7 +6,7 @@ from plugins.convert._config import Config -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) def get_config(plugin_name, configfile=None): diff --git a/plugins/convert/scaling/_base.py b/plugins/convert/scaling/_base.py index bee1321be9..036ddc1557 100644 --- a/plugins/convert/scaling/_base.py +++ b/plugins/convert/scaling/_base.py @@ -6,7 +6,7 @@ from plugins.convert._config import Config -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) def get_config(plugin_name, configfile=None): diff --git a/plugins/convert/writer/_base.py b/plugins/convert/writer/_base.py index 2961683b91..33389f7989 100644 --- a/plugins/convert/writer/_base.py +++ b/plugins/convert/writer/_base.py @@ -10,7 +10,7 @@ from plugins.convert._config import Config -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) def get_config(plugin_name: str, configfile: str | None = None) -> dict: diff --git a/plugins/extract/pipeline.py b/plugins/extract/pipeline.py index 80f598acc9..0cca3e5092 100644 --- a/plugins/extract/pipeline.py +++ b/plugins/extract/pipeline.py @@ -30,7 +30,7 @@ from plugins.extract.mask._base import Masker from plugins.extract.recognition._base import Identity -logger = logging.getLogger(__name__) # pylint:disable=invalid-name +logger = logging.getLogger(__name__) _INSTANCES = -1 # Tracking for multiple instances of pipeline diff --git a/plugins/extract/recognition/vgg_face2.py b/plugins/extract/recognition/vgg_face2.py index ae717c75a2..aa25a4efa3 100644 --- a/plugins/extract/recognition/vgg_face2.py +++ b/plugins/extract/recognition/vgg_face2.py @@ -17,7 +17,7 @@ if T.TYPE_CHECKING: from collections.abc import Generator -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class Recognition(Identity): diff --git a/plugins/plugin_loader.py b/plugins/plugin_loader.py index 30b9762177..7d47c20680 100644 --- a/plugins/plugin_loader.py +++ b/plugins/plugin_loader.py @@ -16,7 +16,7 @@ from plugins.train.model._base import ModelBase from plugins.train.trainer._base import TrainerBase -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class PluginLoader(): diff --git a/plugins/train/model/_base/io.py b/plugins/train/model/_base/io.py index 47f1ea80d2..c52bf53094 100644 --- a/plugins/train/model/_base/io.py +++ b/plugins/train/model/_base/io.py @@ -24,7 +24,7 @@ from .model import ModelBase kmodels = tf.keras.models -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) def get_all_sub_models( diff --git a/plugins/train/model/_base/model.py b/plugins/train/model/_base/model.py index f46b08f30e..c3c448d665 100644 --- a/plugins/train/model/_base/model.py +++ b/plugins/train/model/_base/model.py @@ -32,7 +32,7 @@ K = tf.keras.backend -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) _CONFIG: dict[str, ConfigValueType] = {} diff --git a/plugins/train/model/_base/settings.py b/plugins/train/model/_base/settings.py index e43705a5e5..f2a9aba321 100644 --- a/plugins/train/model/_base/settings.py +++ b/plugins/train/model/_base/settings.py @@ -36,7 +36,7 @@ keras = tf.keras K = keras.backend -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) @dataclass diff --git a/plugins/train/model/dfaker.py b/plugins/train/model/dfaker.py index 784178c94c..0ad08357fd 100644 --- a/plugins/train/model/dfaker.py +++ b/plugins/train/model/dfaker.py @@ -12,7 +12,7 @@ from lib.model.nn_blocks import Conv2DOutput, UpscaleBlock, ResidualBlock from .original import Model as OriginalModel -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class Model(OriginalModel): diff --git a/plugins/train/model/dfl_sae.py b/plugins/train/model/dfl_sae.py index 6daf91ecc2..0c54e0031d 100644 --- a/plugins/train/model/dfl_sae.py +++ b/plugins/train/model/dfl_sae.py @@ -14,7 +14,7 @@ from ._base import ModelBase -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class Model(ModelBase): diff --git a/plugins/train/model/dlight.py b/plugins/train/model/dlight.py index 48e39d51ad..154b090466 100644 --- a/plugins/train/model/dlight.py +++ b/plugins/train/model/dlight.py @@ -22,7 +22,7 @@ from ._base import ModelBase -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class Model(ModelBase): diff --git a/plugins/train/model/phaze_a.py b/plugins/train/model/phaze_a.py index aaabff3b62..28c0f31a69 100644 --- a/plugins/train/model/phaze_a.py +++ b/plugins/train/model/phaze_a.py @@ -20,7 +20,7 @@ from ._base import ModelBase, get_all_sub_models -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) K = tf.keras.backend kapp = tf.keras.applications diff --git a/plugins/train/model/realface.py b/plugins/train/model/realface.py index 2c7e22d190..30d0d7f8f1 100644 --- a/plugins/train/model/realface.py +++ b/plugins/train/model/realface.py @@ -18,7 +18,7 @@ from lib.model.nn_blocks import Conv2DOutput, Conv2DBlock, ResidualBlock, UpscaleBlock from ._base import ModelBase -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class Model(ModelBase): diff --git a/scripts/convert.py b/scripts/convert.py index 38a5eebb72..a5b11da59a 100644 --- a/scripts/convert.py +++ b/scripts/convert.py @@ -35,7 +35,7 @@ from lib.queue_manager import EventQueue -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) @dataclass diff --git a/scripts/extract.py b/scripts/extract.py index 44a7434bf6..2b16aaa4b9 100644 --- a/scripts/extract.py +++ b/scripts/extract.py @@ -24,7 +24,7 @@ from lib.align.alignments import PNGHeaderAlignmentsDict # tqdm.monitor_interval = 0 # workaround for TqdmSynchronisationWarning # TODO? -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class Extract(): # pylint:disable=too-few-public-methods diff --git a/scripts/fsmedia.py b/scripts/fsmedia.py index 0b4ea078f8..0663a58349 100644 --- a/scripts/fsmedia.py +++ b/scripts/fsmedia.py @@ -27,7 +27,7 @@ from lib.align import AlignedFace from plugins.extract.pipeline import ExtractMedia -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) def finalize(images_found: int, num_faces_detected: int, verify_output: bool) -> None: diff --git a/scripts/gui.py b/scripts/gui.py index 63f8dbf59d..4417458ea9 100644 --- a/scripts/gui.py +++ b/scripts/gui.py @@ -10,7 +10,7 @@ get_images, initialize_images, initialize_config, LastSession, MainMenuBar, preview_trigger, ProcessWrapper, StatusBar) -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class FaceswapGui(tk.Tk): diff --git a/setup.py b/setup.py index 0b6c223291..3f4c29cb7e 100755 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ from lib.logger import log_setup -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) backend_type: T.TypeAlias = T.Literal['nvidia', 'apple_silicon', 'directml', 'cpu', 'rocm', "all"] _INSTALL_FAILED = False diff --git a/tools/alignments/alignments.py b/tools/alignments/alignments.py index 6ffc3f84a7..9e020730fc 100644 --- a/tools/alignments/alignments.py +++ b/tools/alignments/alignments.py @@ -15,7 +15,7 @@ from .jobs_frames import Draw, Extract # noqa pylint: disable=unused-import -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class Alignments(): # pylint:disable=too-few-public-methods diff --git a/tools/alignments/media.py b/tools/alignments/media.py index ee6bcc21d2..9fafdf0a21 100644 --- a/tools/alignments/media.py +++ b/tools/alignments/media.py @@ -24,7 +24,7 @@ import numpy as np from lib.align.alignments import AlignmentFileDict, PNGHeaderDict -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class AlignmentData(Alignments): diff --git a/tools/effmpeg/effmpeg.py b/tools/effmpeg/effmpeg.py index 025b7d4a31..724c555e4a 100644 --- a/tools/effmpeg/effmpeg.py +++ b/tools/effmpeg/effmpeg.py @@ -19,7 +19,7 @@ # faceswap imports from lib.utils import _image_extensions, _video_extensions -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class DataItem(): diff --git a/tools/manual/faceviewer/frame.py b/tools/manual/faceviewer/frame.py index 3c07b364b0..f1443d9b20 100644 --- a/tools/manual/faceviewer/frame.py +++ b/tools/manual/faceviewer/frame.py @@ -17,7 +17,7 @@ from .viewport import Viewport -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) # LOCALES _LANG = gettext.translation("tools.manual", localedir="locales", fallback=True) diff --git a/tools/manual/faceviewer/viewport.py b/tools/manual/faceviewer/viewport.py index 73c9205975..0ca4818d8f 100644 --- a/tools/manual/faceviewer/viewport.py +++ b/tools/manual/faceviewer/viewport.py @@ -10,7 +10,7 @@ from lib.align import AlignedFace -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class Viewport(): diff --git a/tools/manual/frameviewer/control.py b/tools/manual/frameviewer/control.py index 54737783b3..2112ad174f 100644 --- a/tools/manual/frameviewer/control.py +++ b/tools/manual/frameviewer/control.py @@ -11,7 +11,7 @@ from lib.align import AlignedFace -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class Navigation(): diff --git a/tools/manual/frameviewer/editor/_base.py b/tools/manual/frameviewer/editor/_base.py index 46c19b5bd2..3e5bf81b5e 100644 --- a/tools/manual/frameviewer/editor/_base.py +++ b/tools/manual/frameviewer/editor/_base.py @@ -11,7 +11,7 @@ from lib.gui.control_helper import ControlPanelOption -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) # LOCALES _LANG = gettext.translation("tools.manual", localedir="locales", fallback=True) diff --git a/tools/manual/frameviewer/frame.py b/tools/manual/frameviewer/frame.py index b4495ef111..b448265c78 100644 --- a/tools/manual/frameviewer/frame.py +++ b/tools/manual/frameviewer/frame.py @@ -16,7 +16,7 @@ from .editor import (BoundingBox, ExtractBox, Landmarks, Mask, # noqa pylint:disable=unused-import Mesh, View) -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) # LOCALES _LANG = gettext.translation("tools.manual", localedir="locales", fallback=True) diff --git a/tools/manual/manual.py b/tools/manual/manual.py index 07d9f07253..f2187dbcdc 100644 --- a/tools/manual/manual.py +++ b/tools/manual/manual.py @@ -31,7 +31,7 @@ from lib.align.detected_face import Mask from lib.queue_manager import EventQueue -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) TypeManualExtractor = T.Literal["FAN", "cv2-dnn", "mask"] diff --git a/tools/model/model.py b/tools/model/model.py index 9bdac28556..d179d8d9ae 100644 --- a/tools/model/model.py +++ b/tools/model/model.py @@ -20,7 +20,7 @@ if T.TYPE_CHECKING: import argparse -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) class Model(): # pylint:disable=too-few-public-methods diff --git a/tools/preview/preview.py b/tools/preview/preview.py index 945799f90f..caef0e7353 100644 --- a/tools/preview/preview.py +++ b/tools/preview/preview.py @@ -34,7 +34,7 @@ from lib.queue_manager import EventQueue from .control_panels import BusyProgressBar -logger = logging.getLogger(__name__) # pylint: disable=invalid-name +logger = logging.getLogger(__name__) # LOCALES _LANG = gettext.translation("tools.preview", localedir="locales", fallback=True)