1
0
Fork 0
mirror of https://github.com/deepfakes/faceswap synced 2025-06-07 10:43:27 -04:00

linting: Remove pylint hint for logger

This commit is contained in:
torzdf 2024-04-03 14:03:54 +01:00
parent 97a842112c
commit a9d87ae007
70 changed files with 70 additions and 70 deletions

View file

@ -426,7 +426,7 @@ max-returns=6
max-statements=50 max-statements=50
# Minimum number of public methods for a class (see R0903). # Minimum number of public methods for a class (see R0903).
min-public-methods=2 min-public-methods=1
[CLASSES] [CLASSES]

View file

@ -9,7 +9,7 @@ from threading import Lock
import cv2 import cv2
import numpy as np import numpy as np
logger = logging.getLogger(__name__) # pylint:disable=invalid-name logger = logging.getLogger(__name__)
CenteringType = T.Literal["face", "head", "legacy"] CenteringType = T.Literal["face", "head", "legacy"]
_MEAN_FACE = np.array([[0.010086, 0.106454], [0.085135, 0.038915], [0.191003, 0.018748], _MEAN_FACE = np.array([[0.010086, 0.106454], [0.085135, 0.038915], [0.191003, 0.018748],

View file

@ -16,7 +16,7 @@ if T.TYPE_CHECKING:
from collections.abc import Generator from collections.abc import Generator
from .aligned_face import CenteringType from .aligned_face import CenteringType
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
_VERSION = 2.3 _VERSION = 2.3
# VERSION TRACKING # VERSION TRACKING
# 1.0 - Never really existed. Basically any alignments file prior to version 2.0 # 1.0 - Never really existed. Basically any alignments file prior to version 2.0

View file

@ -21,7 +21,7 @@ if T.TYPE_CHECKING:
from collections.abc import Callable from collections.abc import Callable
from .aligned_face import CenteringType from .aligned_face import CenteringType
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class DetectedFace(): class DetectedFace():

View file

@ -19,7 +19,7 @@ from .actions import (DirFullPaths, DirOrFileFullPaths, DirOrFilesFullPaths, Fil
FilesFullPaths, MultiOption, Radio, SaveFileFullPaths, Slider) FilesFullPaths, MultiOption, Radio, SaveFileFullPaths, Slider)
from .launcher import ScriptExecutor from .launcher import ScriptExecutor
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
_GPUS = GPUStats().cli_devices _GPUS = GPUStats().cli_devices
# LOCALES # LOCALES

View file

@ -18,7 +18,7 @@ if T.TYPE_CHECKING:
import argparse import argparse
from collections.abc import Callable 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 class ScriptExecutor(): # pylint:disable=too-few-public-methods

View file

@ -23,7 +23,7 @@ _ = _LANG.gettext
OrderedDictSectionType = OrderedDict[str, "ConfigSection"] OrderedDictSectionType = OrderedDict[str, "ConfigSection"]
OrderedDictItemType = OrderedDict[str, "ConfigItem"] OrderedDictItemType = OrderedDict[str, "ConfigItem"]
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
ConfigValueType = bool | int | float | list[str] | str | None ConfigValueType = bool | int | float | list[str] | str | None

View file

@ -23,7 +23,7 @@ if T.TYPE_CHECKING:
from plugins.convert.mask.mask_blend import Mask as MaskAdjust from plugins.convert.mask.mask_blend import Mask as MaskAdjust
from plugins.convert.scaling._base import Adjustment as ScalingAdjust from plugins.convert.scaling._base import Adjustment as ScalingAdjust
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
@dataclass @dataclass

View file

@ -9,7 +9,7 @@ from matplotlib import font_manager
from lib.config import FaceswapConfig from lib.config import FaceswapConfig
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class Config(FaceswapConfig): class Config(FaceswapConfig):

View file

@ -21,7 +21,7 @@ from lib.serializer import get_serializer
if T.TYPE_CHECKING: if T.TYPE_CHECKING:
from collections.abc import Generator, Iterator from collections.abc import Generator, Iterator
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
@dataclass @dataclass

View file

@ -22,7 +22,7 @@ from lib.serializer import get_serializer
from .event_reader import TensorBoardLogs from .event_reader import TensorBoardLogs
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class GlobalSession(): class GlobalSession():

View file

@ -10,7 +10,7 @@ from .control_helper import ControlPanel
from .custom_widgets import Tooltip from .custom_widgets import Tooltip
from .utils import get_images, get_config from .utils import get_images, get_config
logger = logging.getLogger(__name__) # pylint:disable=invalid-name logger = logging.getLogger(__name__)
# LOCALES # LOCALES
_LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True) _LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True)

View file

@ -15,7 +15,7 @@ from _tkinter import Tcl_Obj, TclError
from .custom_widgets import ContextMenu, MultiOption, ToggledFrame, Tooltip from .custom_widgets import ContextMenu, MultiOption, ToggledFrame, Tooltip
from .utils import FileHandler, get_config, get_images from .utils import FileHandler, get_config, get_images
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
# LOCALES # LOCALES
_LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True) _LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True)

View file

@ -13,7 +13,7 @@ import numpy as np
from .utils import get_config 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 class ContextMenu(tk.Menu): # pylint: disable=too-many-ancestors

View file

@ -16,7 +16,7 @@ from .display_analysis import Analysis
from .display_command import GraphDisplay, PreviewExtract, PreviewTrain from .display_command import GraphDisplay, PreviewExtract, PreviewTrain
from .utils import get_config from .utils import get_config
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
# LOCALES # LOCALES
_LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True) _LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True)

View file

@ -16,7 +16,7 @@ from .popup_session import SessionPopUp
from .analysis import Session from .analysis import Session
from .utils import FileHandler, get_config, get_images, LongRunningTask from .utils import FileHandler, get_config, get_images, LongRunningTask
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
# LOCALES # LOCALES
_LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True) _LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True)

View file

@ -19,7 +19,7 @@ from .analysis import Calculations, Session
from .control_helper import set_slider_rounding from .control_helper import set_slider_rounding
from .utils import FileHandler, get_config, get_images, preview_trigger from .utils import FileHandler, get_config, get_images, preview_trigger
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
# LOCALES # LOCALES
_LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True) _LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True)

View file

@ -9,7 +9,7 @@ from tkinter import ttk
from .custom_widgets import Tooltip from .custom_widgets import Tooltip
from .utils import get_images from .utils import get_images
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
# LOCALES # LOCALES
_LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True) _LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True)

View file

@ -22,7 +22,7 @@ from .utils import get_config, get_images
if T.TYPE_CHECKING: if T.TYPE_CHECKING:
from scripts.gui import FaceswapGui from scripts.gui import FaceswapGui
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
# LOCALES # LOCALES
_LANG = gettext.translation("gui.menu", localedir="locales", fallback=True) _LANG = gettext.translation("gui.menu", localedir="locales", fallback=True)

View file

@ -13,7 +13,7 @@ from lib.cli import actions, args as cli
from .utils import get_images from .utils import get_images
from .control_helper import ControlPanelOption from .control_helper import ControlPanelOption
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class CliOptions(): class CliOptions():

View file

@ -22,7 +22,7 @@ from .utils import FileHandler, get_config, get_images, PATHCACHE
if T.TYPE_CHECKING: if T.TYPE_CHECKING:
from lib.config import FaceswapConfig from lib.config import FaceswapConfig
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
# LOCALES # LOCALES
_LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True) _LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True)

View file

@ -15,7 +15,7 @@ from .display_graph import SessionGraph
from .analysis import Calculations, Session from .analysis import Calculations, Session
from .utils import FileHandler, get_images, LongRunningTask from .utils import FileHandler, get_images, LongRunningTask
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
# LOCALES # LOCALES
_LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True) _LANG = gettext.translation("gui.tooltips", localedir="locales", fallback=True)

View file

@ -8,7 +8,7 @@ from tkinter import messagebox
from lib.serializer import get_serializer 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 class _GuiSession(): # pylint:disable=too-few-public-methods

View file

@ -11,7 +11,7 @@ from lib.serializer import get_serializer
from lib.utils import FaceswapError 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 class Style(): # pylint:disable=too-few-public-methods

View file

@ -20,7 +20,7 @@ if T.TYPE_CHECKING:
from lib.gui.command import CommandNotebook from lib.gui.command import CommandNotebook
from lib.gui.command import ToolsNotebook 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") PATHCACHE = os.path.join(os.path.realpath(os.path.dirname(sys.argv[0])), "lib", "gui", ".cache")
_CONFIG: Config | None = None _CONFIG: Config | None = None

View file

@ -6,7 +6,7 @@ import tkinter as tk
from tkinter import filedialog from tkinter import filedialog
import typing as T 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", _FILETYPE = T.Literal["default", "alignments", "config_project", "config_task",
"config_all", "csv", "image", "ini", "state", "log", "video"] "config_all", "csv", "image", "ini", "state", "log", "video"]
_HANDLETYPE = T.Literal["open", "save", "filename", "filename_multi", "save_filename", _HANDLETYPE = T.Literal["open", "save", "filename", "filename_multi", "save_filename",

View file

@ -16,7 +16,7 @@ from .config import get_config, PATHCACHE
if T.TYPE_CHECKING: if T.TYPE_CHECKING:
from collections.abc import Sequence from collections.abc import Sequence
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
_IMAGES: "Images" | None = None _IMAGES: "Images" | None = None
_PREVIEW_TRIGGER: "PreviewTrigger" | None = None _PREVIEW_TRIGGER: "PreviewTrigger" | None = None
TRAININGPREVIEW = ".gui_training_preview.png" TRAININGPREVIEW = ".gui_training_preview.png"

View file

@ -16,7 +16,7 @@ if T.TYPE_CHECKING:
from lib.multithreading import _ErrorType from lib.multithreading import _ErrorType
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class LongRunningTask(Thread): class LongRunningTask(Thread):

View file

@ -20,7 +20,7 @@ from .utils import get_config, get_images, LongRunningTask, preview_trigger
if os.name == "nt": if os.name == "nt":
import win32console # pylint: disable=import-error import win32console # pylint: disable=import-error
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class ProcessWrapper(): class ProcessWrapper():

View file

@ -28,7 +28,7 @@ from lib.utils import convert_to_secs, FaceswapError, _video_extensions, get_ima
if T.TYPE_CHECKING: if T.TYPE_CHECKING:
from lib.align.alignments import PNGHeaderDict from lib.align.alignments import PNGHeaderDict
logger = logging.getLogger(__name__) # pylint:disable=invalid-name logger = logging.getLogger(__name__)
# ################### # # ################### #
# <<< IMAGE UTILS >>> # # <<< IMAGE UTILS >>> #

View file

@ -10,7 +10,7 @@ from shutil import copyfile, copytree, rmtree
from lib.serializer import get_serializer from lib.serializer import get_serializer
from lib.utils import get_folder from lib.utils import get_folder
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class Backup(): class Backup():

View file

@ -13,7 +13,7 @@ keras = tf.keras
K = keras.backend K = keras.backend
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
def compute_fans(shape, data_format='channels_last'): def compute_fans(shape, data_format='channels_last'):

View file

@ -19,7 +19,7 @@ if T.TYPE_CHECKING:
from tensorflow import Tensor from tensorflow import Tensor
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
_CONFIG: dict = {} _CONFIG: dict = {}

View file

@ -17,7 +17,7 @@ from lib.utils import get_backend
if T.TYPE_CHECKING: if T.TYPE_CHECKING:
from collections.abc import Callable from collections.abc import Callable
logger = logging.getLogger(__name__) # pylint:disable=invalid-name logger = logging.getLogger(__name__)
class KSession(): class KSession():

View file

@ -13,7 +13,7 @@ from types import TracebackType
if T.TYPE_CHECKING: if T.TYPE_CHECKING:
from collections.abc import Callable, Generator from collections.abc import Callable, Generator
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
_ErrorType: T.TypeAlias = tuple[type[BaseException], _ErrorType: T.TypeAlias = tuple[type[BaseException],
BaseException, BaseException,
TracebackType] | tuple[T.Any, T.Any, T.Any] | None TracebackType] | tuple[T.Any, T.Any, T.Any] | None

View file

@ -10,7 +10,7 @@ import threading
from queue import Queue, Empty as QueueEmpty # pylint: disable=unused-import; # noqa from queue import Queue, Empty as QueueEmpty # pylint: disable=unused-import; # noqa
from time import sleep from time import sleep
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class EventQueue(Queue): class EventQueue(Queue):

View file

@ -21,7 +21,7 @@ try:
except ImportError: except ImportError:
_HAS_YAML = False _HAS_YAML = False
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class Serializer(): class Serializer():

View file

@ -15,7 +15,7 @@ from lib.image import batch_convert_color
if T.TYPE_CHECKING: if T.TYPE_CHECKING:
from lib.config import ConfigValueType from lib.config import ConfigValueType
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
@dataclass @dataclass

View file

@ -14,7 +14,7 @@ from fastcluster import linkage
from lib.utils import GetModel from lib.utils import GetModel
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class VGGFace(): class VGGFace():

View file

@ -6,7 +6,7 @@ import os
from lib.config import FaceswapConfig from lib.config import FaceswapConfig
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class Config(FaceswapConfig): class Config(FaceswapConfig):

View file

@ -6,7 +6,7 @@ import numpy as np
from plugins.convert._config import Config 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): def get_config(plugin_name, configfile=None):

View file

@ -6,7 +6,7 @@ import numpy as np
from plugins.convert._config import Config 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): def get_config(plugin_name, configfile=None):

View file

@ -10,7 +10,7 @@ import numpy as np
from plugins.convert._config import Config 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: def get_config(plugin_name: str, configfile: str | None = None) -> dict:

View file

@ -30,7 +30,7 @@ if T.TYPE_CHECKING:
from plugins.extract.mask._base import Masker from plugins.extract.mask._base import Masker
from plugins.extract.recognition._base import Identity 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 _INSTANCES = -1 # Tracking for multiple instances of pipeline

View file

@ -17,7 +17,7 @@ from ._base import BatchType, RecogBatch, Identity
if T.TYPE_CHECKING: if T.TYPE_CHECKING:
from collections.abc import Generator from collections.abc import Generator
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class Recognition(Identity): class Recognition(Identity):

View file

@ -16,7 +16,7 @@ if T.TYPE_CHECKING:
from plugins.train.model._base import ModelBase from plugins.train.model._base import ModelBase
from plugins.train.trainer._base import TrainerBase from plugins.train.trainer._base import TrainerBase
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class PluginLoader(): class PluginLoader():

View file

@ -24,7 +24,7 @@ if T.TYPE_CHECKING:
from .model import ModelBase from .model import ModelBase
kmodels = tf.keras.models kmodels = tf.keras.models
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
def get_all_sub_models( def get_all_sub_models(

View file

@ -32,7 +32,7 @@ keras = tf.keras
K = tf.keras.backend K = tf.keras.backend
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
_CONFIG: dict[str, ConfigValueType] = {} _CONFIG: dict[str, ConfigValueType] = {}

View file

@ -36,7 +36,7 @@ if T.TYPE_CHECKING:
keras = tf.keras keras = tf.keras
K = keras.backend K = keras.backend
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
@dataclass @dataclass

View file

@ -12,7 +12,7 @@ from tensorflow.keras.models import Model as KModel # pylint:disable=import-err
from lib.model.nn_blocks import Conv2DOutput, UpscaleBlock, ResidualBlock from lib.model.nn_blocks import Conv2DOutput, UpscaleBlock, ResidualBlock
from .original import Model as OriginalModel from .original import Model as OriginalModel
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class Model(OriginalModel): class Model(OriginalModel):

View file

@ -14,7 +14,7 @@ from lib.model.nn_blocks import Conv2DOutput, Conv2DBlock, ResidualBlock, Upscal
from ._base import ModelBase from ._base import ModelBase
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class Model(ModelBase): class Model(ModelBase):

View file

@ -22,7 +22,7 @@ from lib.utils import FaceswapError
from ._base import ModelBase from ._base import ModelBase
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class Model(ModelBase): class Model(ModelBase):

View file

@ -20,7 +20,7 @@ from lib.utils import get_tf_version, FaceswapError
from ._base import ModelBase, get_all_sub_models from ._base import ModelBase, get_all_sub_models
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
K = tf.keras.backend K = tf.keras.backend
kapp = tf.keras.applications kapp = tf.keras.applications

View file

@ -18,7 +18,7 @@ from tensorflow.keras.models import Model as KModel # pylint:disable=import-err
from lib.model.nn_blocks import Conv2DOutput, Conv2DBlock, ResidualBlock, UpscaleBlock from lib.model.nn_blocks import Conv2DOutput, Conv2DBlock, ResidualBlock, UpscaleBlock
from ._base import ModelBase from ._base import ModelBase
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class Model(ModelBase): class Model(ModelBase):

View file

@ -35,7 +35,7 @@ if T.TYPE_CHECKING:
from lib.queue_manager import EventQueue from lib.queue_manager import EventQueue
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
@dataclass @dataclass

View file

@ -24,7 +24,7 @@ if T.TYPE_CHECKING:
from lib.align.alignments import PNGHeaderAlignmentsDict from lib.align.alignments import PNGHeaderAlignmentsDict
# tqdm.monitor_interval = 0 # workaround for TqdmSynchronisationWarning # TODO? # 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 class Extract(): # pylint:disable=too-few-public-methods

View file

@ -27,7 +27,7 @@ if T.TYPE_CHECKING:
from lib.align import AlignedFace from lib.align import AlignedFace
from plugins.extract.pipeline import ExtractMedia 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: def finalize(images_found: int, num_faces_detected: int, verify_output: bool) -> None:

View file

@ -10,7 +10,7 @@ from lib.gui import (TaskBar, CliOptions, CommandNotebook, ConsoleOut, DisplayNo
get_images, initialize_images, initialize_config, LastSession, get_images, initialize_images, initialize_config, LastSession,
MainMenuBar, preview_trigger, ProcessWrapper, StatusBar) MainMenuBar, preview_trigger, ProcessWrapper, StatusBar)
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class FaceswapGui(tk.Tk): class FaceswapGui(tk.Tk):

View file

@ -19,7 +19,7 @@ from pkg_resources import parse_requirements
from lib.logger import log_setup 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"] backend_type: T.TypeAlias = T.Literal['nvidia', 'apple_silicon', 'directml', 'cpu', 'rocm', "all"]
_INSTALL_FAILED = False _INSTALL_FAILED = False

View file

@ -15,7 +15,7 @@ from .jobs_faces import FromFaces, RemoveFaces, Rename # noqa pylint: disable=u
from .jobs_frames import Draw, Extract # noqa pylint: disable=unused-import 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 class Alignments(): # pylint:disable=too-few-public-methods

View file

@ -24,7 +24,7 @@ if T.TYPE_CHECKING:
import numpy as np import numpy as np
from lib.align.alignments import AlignmentFileDict, PNGHeaderDict from lib.align.alignments import AlignmentFileDict, PNGHeaderDict
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class AlignmentData(Alignments): class AlignmentData(Alignments):

View file

@ -19,7 +19,7 @@ from ffmpy import FFmpeg, FFRuntimeError
# faceswap imports # faceswap imports
from lib.utils import _image_extensions, _video_extensions from lib.utils import _image_extensions, _video_extensions
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class DataItem(): class DataItem():

View file

@ -17,7 +17,7 @@ from lib.image import hex_to_rgb, rgb_to_hex
from .viewport import Viewport from .viewport import Viewport
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
# LOCALES # LOCALES
_LANG = gettext.translation("tools.manual", localedir="locales", fallback=True) _LANG = gettext.translation("tools.manual", localedir="locales", fallback=True)

View file

@ -10,7 +10,7 @@ from PIL import Image, ImageTk
from lib.align import AlignedFace from lib.align import AlignedFace
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class Viewport(): class Viewport():

View file

@ -11,7 +11,7 @@ from PIL import Image, ImageTk
from lib.align import AlignedFace from lib.align import AlignedFace
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class Navigation(): class Navigation():

View file

@ -11,7 +11,7 @@ import numpy as np
from lib.gui.control_helper import ControlPanelOption from lib.gui.control_helper import ControlPanelOption
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
# LOCALES # LOCALES
_LANG = gettext.translation("tools.manual", localedir="locales", fallback=True) _LANG = gettext.translation("tools.manual", localedir="locales", fallback=True)

View file

@ -16,7 +16,7 @@ from .control import Navigation, BackgroundImage
from .editor import (BoundingBox, ExtractBox, Landmarks, Mask, # noqa pylint:disable=unused-import from .editor import (BoundingBox, ExtractBox, Landmarks, Mask, # noqa pylint:disable=unused-import
Mesh, View) Mesh, View)
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
# LOCALES # LOCALES
_LANG = gettext.translation("tools.manual", localedir="locales", fallback=True) _LANG = gettext.translation("tools.manual", localedir="locales", fallback=True)

View file

@ -31,7 +31,7 @@ if T.TYPE_CHECKING:
from lib.align.detected_face import Mask from lib.align.detected_face import Mask
from lib.queue_manager import EventQueue 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"] TypeManualExtractor = T.Literal["FAN", "cv2-dnn", "mask"]

View file

@ -20,7 +20,7 @@ from plugins.train.model._base.model import _Inference
if T.TYPE_CHECKING: if T.TYPE_CHECKING:
import argparse import argparse
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
class Model(): # pylint:disable=too-few-public-methods class Model(): # pylint:disable=too-few-public-methods

View file

@ -34,7 +34,7 @@ if T.TYPE_CHECKING:
from lib.queue_manager import EventQueue from lib.queue_manager import EventQueue
from .control_panels import BusyProgressBar from .control_panels import BusyProgressBar
logger = logging.getLogger(__name__) # pylint: disable=invalid-name logger = logging.getLogger(__name__)
# LOCALES # LOCALES
_LANG = gettext.translation("tools.preview", localedir="locales", fallback=True) _LANG = gettext.translation("tools.preview", localedir="locales", fallback=True)