diff --git a/Main.py b/Main.py index 340415e..1fdfa3b 100644 --- a/Main.py +++ b/Main.py @@ -1,10 +1,11 @@ # -*- coding: utf-8 -*- # Copyright (c) 2022-2024, Harry Huang # @ BSD 3-Clause License -import os import time import argparse +import os import os.path as osp + from src.utils import ArgParser from src.utils.Config import Config from src.utils.Logger import Logger diff --git a/src/CollectModels.py b/src/CollectModels.py index 7493a75..9b22494 100644 --- a/src/CollectModels.py +++ b/src/CollectModels.py @@ -4,6 +4,7 @@ import re import shutil import os.path as osp + from .utils.Config import Config, PerformanceLevel from .utils.GlobalMethods import print, rmdir, get_dirlist from .utils.Logger import Logger diff --git a/src/CombineRGBwithA.py b/src/CombineRGBwithA.py index 5ac7d16..ba30e07 100644 --- a/src/CombineRGBwithA.py +++ b/src/CombineRGBwithA.py @@ -1,9 +1,10 @@ # -*- coding: utf-8 -*- # Copyright (c) 2022-2024, Harry Huang # @ BSD 3-Clause License -import os import re +import os import os.path as osp + from PIL import Image from .utils.Config import Config, PerformanceLevel from .utils.GlobalMethods import print, rmdir, get_filelist, is_image_file diff --git a/src/ModelsDataDist.py b/src/ModelsDataDist.py index 08f2baa..0563a16 100644 --- a/src/ModelsDataDist.py +++ b/src/ModelsDataDist.py @@ -1,12 +1,13 @@ # -*- coding: utf-8 -*- # Copyright (c) 2022-2024, Harry Huang # @ BSD 3-Clause License -import os import re import json import shutil +import os import os.path as osp from datetime import datetime + from .ResolveAB import ab_resolve from .ResolveFBO import ArkFBOLibrary from .utils.GlobalMethods import color, print, get_dirlist, get_filelist diff --git a/src/ResolveAB.py b/src/ResolveAB.py index d01a0b0..c044a47 100644 --- a/src/ResolveAB.py +++ b/src/ResolveAB.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- # Copyright (c) 2022-2024, Harry Huang # @ BSD 3-Clause License -import UnityPy import os.path as osp + +import UnityPy import UnityPy.classes as uc from .CombineRGBwithA import AlphaRGBCombiner from .utils.Config import Config, PerformanceLevel diff --git a/src/ResolveFBO.py b/src/ResolveFBO.py index e8fbc3e..40b06a2 100644 --- a/src/ResolveFBO.py +++ b/src/ResolveFBO.py @@ -3,10 +3,11 @@ # @ BSD 3-Clause License import os.path as osp import json +import types import pkgutil import importlib.util + import numpy as np -from types import ModuleType from .utils.Config import Config, PerformanceLevel from .utils.GlobalMethods import print, rmdir, get_filelist, is_ab_file, is_known_asset_file from .utils.Logger import Logger @@ -18,7 +19,7 @@ class PackageHelper: """Helper class for dynamic package inspection.""" @staticmethod - def get_modules_from_package(package:ModuleType): + def get_modules_from_package(package:types.ModuleType): walk_result = pkgutil.walk_packages(package.__path__, package.__name__ + '.') module_names = [name for _, name, is_pkg in walk_result if not is_pkg] return [importlib.import_module(name) for name in module_names] diff --git a/src/utils/Config.py b/src/utils/Config.py index 58253f5..0783c51 100644 --- a/src/utils/Config.py +++ b/src/utils/Config.py @@ -1,8 +1,10 @@ # -*- coding: utf-8 -*- # Copyright (c) 2022-2024, Harry Huang # @ BSD 3-Clause License -import os, json +import json +import os import os.path as osp + from .Logger import Logger diff --git a/src/utils/GlobalMethods.py b/src/utils/GlobalMethods.py index d5923e3..99beb21 100644 --- a/src/utils/GlobalMethods.py +++ b/src/utils/GlobalMethods.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- # Copyright (c) 2022-2024, Harry Huang # @ BSD 3-Clause License -import os import builtins import shutil import traceback +import os import os.path as osp diff --git a/src/utils/SaverUtils.py b/src/utils/SaverUtils.py index 3020b57..bd248a1 100644 --- a/src/utils/SaverUtils.py +++ b/src/utils/SaverUtils.py @@ -4,10 +4,11 @@ import os import os.path as osp import threading -import UnityPy.classes as uc from io import BytesIO -from PIL import Image from contextlib import ContextDecorator + +import UnityPy.classes as uc +from PIL import Image from .AnalyUtils import TestRT from .Config import Config, PerformanceLevel from .GlobalMethods import mkdir diff --git a/src/utils/TaskUtils.py b/src/utils/TaskUtils.py index 94a38bc..224f7fc 100644 --- a/src/utils/TaskUtils.py +++ b/src/utils/TaskUtils.py @@ -4,6 +4,7 @@ import time import queue import threading + from .GlobalMethods import color, print, clear from .Logger import Logger