игнорирование недоделаных патчей, удаление лишних импортов

This commit is contained in:
2025-09-02 11:11:17 +03:00
parent 6c01d9ca07
commit d0744050d2
12 changed files with 13 additions and 17 deletions
+6 -1
View File
@@ -61,6 +61,11 @@ def select_apk() -> str:
print("Нет файлов .apk в текущей директории")
sys.exit(1)
if len(apks) == 1:
apk = apks[0]
print(f"Выбран файл {apk}")
return apk
while True:
print("Выберете файл для модификации")
for index, apk in enumerate(apks):
@@ -127,7 +132,7 @@ patch = decompile_apk(apk)
patches = []
for filename in os.listdir("patches/"):
if filename.endswith(".py") and filename != "__init__.py":
if filename.endswith(".py") and filename != "__init__.py" and not filename.startswith("todo_"):
module_name = filename[:-3]
module = importlib.import_module(f"patches.{module_name}")
patches.append(Patch(module_name, module))