mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-21 13:48:19 +00:00
✨ Support auto import patch
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
This commit is contained in:
parent
5865504b7e
commit
0addbe33d8
@ -1 +1 @@
|
||||
Subproject commit 94a4aca6ff3b02f897f96f7a7629a3c72eda4513
|
||||
Subproject commit 30cc0cf8f700f50ad3063b2f3bca4f325f121bd3
|
@ -3,7 +3,6 @@ import os
|
||||
import re
|
||||
from typing import List
|
||||
|
||||
from core.config import config
|
||||
from ..base.hyperionrequest import HyperionRequest
|
||||
from ...models.genshin.hyperion import PostInfo, ArtworkImage
|
||||
from ...typedefs import JSON_DATA
|
||||
@ -124,7 +123,6 @@ class Hyperion:
|
||||
filename = os.path.basename(url)
|
||||
_, file_extension = os.path.splitext(filename)
|
||||
is_image = bool(file_extension in ".jpg" or file_extension in ".png")
|
||||
url = url.replace("https://upload-bbs.miyoushe.com", config.upload_bbs_host)
|
||||
response = await self.client.get(
|
||||
url, params=self.get_images_params(resize=2000) if is_image else None, de_json=False
|
||||
)
|
||||
|
@ -0,0 +1,3 @@
|
||||
import utils.patch
|
||||
|
||||
__all__ = (utils.patch,)
|
@ -1,3 +1,5 @@
|
||||
from utils.patch import simnet
|
||||
import pkgutil
|
||||
from pathlib import Path
|
||||
|
||||
__all__ = ["simnet"]
|
||||
for _, file, _ in pkgutil.iter_modules([str(Path(__file__).parent.absolute())]):
|
||||
__import__(file, globals(), level=1)
|
||||
|
Loading…
Reference in New Issue
Block a user