mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-11-14 01:39:45 +08:00
Run `ruff check app tests scripts --fix` with the configured rule set (E4/E7/E9/F/I): import sorting (I001), f-strings without placeholders (F541), lambda/variable/unused-import cleanups that ruff marks safe. Nine files whose only ruff debt sits next to pre-existing pylint import-resolution errors (lazy exports, sys.path script imports) or whose "unused" imports are reached through attribute access by tests are left untouched so the changed-file pylint gate and the benchmark tests stay green; their diagnostics remain in the baseline. app/startup/lifecycle/__init__.py and app/main.py import business modules after cache composition, import-path and stdio setup on purpose (the source comments document the contract), so declare E402 per-file-ignores for them instead of adding per-line noqa. Ruff ratchet watermark drops from 498 to 100; sync the baseline fixture and the optimization checklist figure. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
36 lines
912 B
Python
36 lines
912 B
Python
"""插件常用的无状态通用工具。"""
|
|
|
|
from app.adapters.system.host import SystemUtils
|
|
from app.application.security.otp import OtpUtils
|
|
from app.foundation.crypto import CryptoJsUtils
|
|
from app.foundation.dom import DomUtils
|
|
from app.foundation.reflection import ObjectUtils
|
|
from app.foundation.singleton import Singleton
|
|
from app.foundation.text import convert, cut
|
|
from app.runtime.execution import log_execution_time, retry
|
|
from app.runtime.localization import LocaleHelper
|
|
from app.runtime.scheduling import TimerUtils
|
|
from app.sdk.string import StringUtils
|
|
|
|
decrypt = CryptoJsUtils.decrypt
|
|
encrypt = CryptoJsUtils.encrypt
|
|
|
|
|
|
__all__ = [
|
|
"CryptoJsUtils",
|
|
"DomUtils",
|
|
"ObjectUtils",
|
|
"OtpUtils",
|
|
"LocaleHelper",
|
|
"Singleton",
|
|
"StringUtils",
|
|
"SystemUtils",
|
|
"TimerUtils",
|
|
"cut",
|
|
"convert",
|
|
"decrypt",
|
|
"encrypt",
|
|
"log_execution_time",
|
|
"retry",
|
|
]
|