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:
parent
97a842112c
commit
a9d87ae007
70 changed files with 70 additions and 70 deletions
|
@ -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]
|
||||
|
|
|
@ -9,7 +9,7 @@ from threading import Lock
|
|||
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],
|
||||
|
|
|
@ -16,7 +16,7 @@ if T.TYPE_CHECKING:
|
|||
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
|
||||
|
|
|
@ -21,7 +21,7 @@ if T.TYPE_CHECKING:
|
|||
from collections.abc import Callable
|
||||
from .aligned_face import CenteringType
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DetectedFace():
|
||||
|
|
|
@ -19,7 +19,7 @@ from .actions import (DirFullPaths, DirOrFileFullPaths, DirOrFilesFullPaths, Fil
|
|||
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
|
||||
|
|
|
@ -18,7 +18,7 @@ if T.TYPE_CHECKING:
|
|||
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
|
||||
|
|
|
@ -23,7 +23,7 @@ _ = _LANG.gettext
|
|||
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
|
||||
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ if T.TYPE_CHECKING:
|
|||
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
|
||||
|
|
|
@ -9,7 +9,7 @@ from matplotlib import font_manager
|
|||
|
||||
from lib.config import FaceswapConfig
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Config(FaceswapConfig):
|
||||
|
|
|
@ -21,7 +21,7 @@ from lib.serializer import get_serializer
|
|||
if T.TYPE_CHECKING:
|
||||
from collections.abc import Generator, Iterator
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -22,7 +22,7 @@ from lib.serializer import get_serializer
|
|||
|
||||
from .event_reader import TensorBoardLogs
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class GlobalSession():
|
||||
|
|
|
@ -10,7 +10,7 @@ from .control_helper import ControlPanel
|
|||
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)
|
||||
|
|
|
@ -15,7 +15,7 @@ from _tkinter import Tcl_Obj, TclError
|
|||
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)
|
||||
|
|
|
@ -13,7 +13,7 @@ import numpy as np
|
|||
|
||||
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
|
||||
|
|
|
@ -16,7 +16,7 @@ from .display_analysis import Analysis
|
|||
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)
|
||||
|
|
|
@ -16,7 +16,7 @@ from .popup_session import SessionPopUp
|
|||
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)
|
||||
|
|
|
@ -19,7 +19,7 @@ from .analysis import Calculations, Session
|
|||
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)
|
||||
|
|
|
@ -9,7 +9,7 @@ from tkinter import ttk
|
|||
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)
|
||||
|
|
|
@ -22,7 +22,7 @@ from .utils import get_config, get_images
|
|||
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)
|
||||
|
|
|
@ -13,7 +13,7 @@ from lib.cli import actions, args as cli
|
|||
from .utils import get_images
|
||||
from .control_helper import ControlPanelOption
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class CliOptions():
|
||||
|
|
|
@ -22,7 +22,7 @@ from .utils import FileHandler, get_config, get_images, PATHCACHE
|
|||
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)
|
||||
|
|
|
@ -15,7 +15,7 @@ from .display_graph import SessionGraph
|
|||
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)
|
||||
|
|
|
@ -8,7 +8,7 @@ from tkinter import messagebox
|
|||
|
||||
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
|
||||
|
|
|
@ -11,7 +11,7 @@ from lib.serializer import get_serializer
|
|||
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
|
||||
|
|
|
@ -20,7 +20,7 @@ if T.TYPE_CHECKING:
|
|||
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
|
||||
|
|
|
@ -6,7 +6,7 @@ import tkinter as tk
|
|||
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",
|
||||
|
|
|
@ -16,7 +16,7 @@ from .config import get_config, PATHCACHE
|
|||
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"
|
||||
|
|
|
@ -16,7 +16,7 @@ if T.TYPE_CHECKING:
|
|||
from lib.multithreading import _ErrorType
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class LongRunningTask(Thread):
|
||||
|
|
|
@ -20,7 +20,7 @@ from .utils import get_config, get_images, LongRunningTask, preview_trigger
|
|||
if os.name == "nt":
|
||||
import win32console # pylint: disable=import-error
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ProcessWrapper():
|
||||
|
|
|
@ -28,7 +28,7 @@ from lib.utils import convert_to_secs, FaceswapError, _video_extensions, get_ima
|
|||
if T.TYPE_CHECKING:
|
||||
from lib.align.alignments import PNGHeaderDict
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint:disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# ################### #
|
||||
# <<< IMAGE UTILS >>> #
|
||||
|
|
|
@ -10,7 +10,7 @@ from shutil import copyfile, copytree, rmtree
|
|||
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():
|
||||
|
|
|
@ -13,7 +13,7 @@ keras = tf.keras
|
|||
K = keras.backend
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def compute_fans(shape, data_format='channels_last'):
|
||||
|
|
|
@ -19,7 +19,7 @@ if T.TYPE_CHECKING:
|
|||
from tensorflow import Tensor
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
_CONFIG: dict = {}
|
||||
|
|
|
@ -17,7 +17,7 @@ from lib.utils import get_backend
|
|||
if T.TYPE_CHECKING:
|
||||
from collections.abc import Callable
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint:disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class KSession():
|
||||
|
|
|
@ -13,7 +13,7 @@ from types import TracebackType
|
|||
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
|
||||
|
|
|
@ -10,7 +10,7 @@ import threading
|
|||
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):
|
||||
|
|
|
@ -21,7 +21,7 @@ try:
|
|||
except ImportError:
|
||||
_HAS_YAML = False
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Serializer():
|
||||
|
|
|
@ -15,7 +15,7 @@ from lib.image import batch_convert_color
|
|||
if T.TYPE_CHECKING:
|
||||
from lib.config import ConfigValueType
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -14,7 +14,7 @@ from fastcluster import linkage
|
|||
|
||||
from lib.utils import GetModel
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class VGGFace():
|
||||
|
|
|
@ -6,7 +6,7 @@ import os
|
|||
|
||||
from lib.config import FaceswapConfig
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Config(FaceswapConfig):
|
||||
|
|
|
@ -6,7 +6,7 @@ import numpy as np
|
|||
|
||||
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):
|
||||
|
|
|
@ -6,7 +6,7 @@ import numpy as np
|
|||
|
||||
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):
|
||||
|
|
|
@ -10,7 +10,7 @@ import numpy as np
|
|||
|
||||
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:
|
||||
|
|
|
@ -30,7 +30,7 @@ if T.TYPE_CHECKING:
|
|||
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
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ from ._base import BatchType, RecogBatch, Identity
|
|||
if T.TYPE_CHECKING:
|
||||
from collections.abc import Generator
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Recognition(Identity):
|
||||
|
|
|
@ -16,7 +16,7 @@ if T.TYPE_CHECKING:
|
|||
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():
|
||||
|
|
|
@ -24,7 +24,7 @@ if T.TYPE_CHECKING:
|
|||
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(
|
||||
|
|
|
@ -32,7 +32,7 @@ keras = tf.keras
|
|||
K = tf.keras.backend
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
_CONFIG: dict[str, ConfigValueType] = {}
|
||||
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ if T.TYPE_CHECKING:
|
|||
keras = tf.keras
|
||||
K = keras.backend
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -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 .original import Model as OriginalModel
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Model(OriginalModel):
|
||||
|
|
|
@ -14,7 +14,7 @@ from lib.model.nn_blocks import Conv2DOutput, Conv2DBlock, ResidualBlock, Upscal
|
|||
|
||||
from ._base import ModelBase
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Model(ModelBase):
|
||||
|
|
|
@ -22,7 +22,7 @@ from lib.utils import FaceswapError
|
|||
from ._base import ModelBase
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Model(ModelBase):
|
||||
|
|
|
@ -20,7 +20,7 @@ from lib.utils import get_tf_version, FaceswapError
|
|||
|
||||
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
|
||||
|
|
|
@ -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 ._base import ModelBase
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Model(ModelBase):
|
||||
|
|
|
@ -35,7 +35,7 @@ if T.TYPE_CHECKING:
|
|||
from lib.queue_manager import EventQueue
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -24,7 +24,7 @@ if T.TYPE_CHECKING:
|
|||
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
|
||||
|
|
|
@ -27,7 +27,7 @@ if T.TYPE_CHECKING:
|
|||
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:
|
||||
|
|
|
@ -10,7 +10,7 @@ from lib.gui import (TaskBar, CliOptions, CommandNotebook, ConsoleOut, DisplayNo
|
|||
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):
|
||||
|
|
2
setup.py
2
setup.py
|
@ -19,7 +19,7 @@ from pkg_resources import parse_requirements
|
|||
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Alignments(): # pylint:disable=too-few-public-methods
|
||||
|
|
|
@ -24,7 +24,7 @@ if T.TYPE_CHECKING:
|
|||
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):
|
||||
|
|
|
@ -19,7 +19,7 @@ from ffmpy import FFmpeg, FFRuntimeError
|
|||
# faceswap imports
|
||||
from lib.utils import _image_extensions, _video_extensions
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DataItem():
|
||||
|
|
|
@ -17,7 +17,7 @@ from lib.image import hex_to_rgb, rgb_to_hex
|
|||
|
||||
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)
|
||||
|
|
|
@ -10,7 +10,7 @@ from PIL import Image, ImageTk
|
|||
|
||||
from lib.align import AlignedFace
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Viewport():
|
||||
|
|
|
@ -11,7 +11,7 @@ from PIL import Image, ImageTk
|
|||
|
||||
from lib.align import AlignedFace
|
||||
|
||||
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Navigation():
|
||||
|
|
|
@ -11,7 +11,7 @@ import numpy as np
|
|||
|
||||
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)
|
||||
|
|
|
@ -16,7 +16,7 @@ from .control import Navigation, BackgroundImage
|
|||
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)
|
||||
|
|
|
@ -31,7 +31,7 @@ if T.TYPE_CHECKING:
|
|||
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"]
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ from plugins.train.model._base.model import _Inference
|
|||
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
|
||||
|
|
|
@ -34,7 +34,7 @@ if T.TYPE_CHECKING:
|
|||
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue