From d00c0e2152d50a8afce0abadbe37d0a7a3ff0661 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Tue, 14 Jan 2025 12:40:13 +0100 Subject: [PATCH] Use mypy and flake8 for face swapper --- .github/workflows/ci.yml | 4 ++-- face_swapper/src/discriminator.py | 4 +++- face_swapper/train.py | 1 - 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b73fedb..6b75de0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,5 +15,5 @@ jobs: - run: pip install flake8 - run: pip install flake8-import-order - run: pip install mypy - - run: flake8 arcface_converter - - run: mypy arcface_converter + - run: flake8 arcface_converter face_swapper + - run: mypy arcface_converter face_swapper diff --git a/face_swapper/src/discriminator.py b/face_swapper/src/discriminator.py index e73f458..ccf3077 100644 --- a/face_swapper/src/discriminator.py +++ b/face_swapper/src/discriminator.py @@ -1,7 +1,9 @@ +from typing import List + import numpy import torch.nn as nn -from .typing import DiscriminatorOutputs, List, Tensor +from .typing import DiscriminatorOutputs, Tensor class NLayerDiscriminator(nn.Module): diff --git a/face_swapper/train.py b/face_swapper/train.py index bbff847..3591cc8 100644 --- a/face_swapper/train.py +++ b/face_swapper/train.py @@ -2,6 +2,5 @@ from src.training import train - if __name__ == '__main__': train()