Skip to content

Commit

Permalink
upd type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
DoroWolf committed Sep 20, 2024
1 parent 233826a commit 6a19d9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions core/dirty_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import json
import re
import time
from typing import Union, List

import aiohttp
from tenacity import retry, wait_fixed, stop_after_attempt
Expand Down Expand Up @@ -47,7 +48,7 @@ def parse_data(result: dict):


@retry(stop=stop_after_attempt(3), wait=wait_fixed(3))
async def check(*text) -> list:
async def check(*text: Union[str, List[str]]) -> List[str]:
'''检查字符串是否合规
:param text: 字符串(List/Union)。
Expand Down Expand Up @@ -152,7 +153,7 @@ async def check(*text) -> list:
return results


async def check_bool(*text):
async def check_bool(*text: Union[str, List[str]]) -> bool:
chk = await check(*text)
for x in chk:
if not x['status']:
Expand Down
1 change: 0 additions & 1 deletion core/utils/web_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from config import CFG
from core.logger import Logger
from core.utils.http import get_url
from core.utils.ip import IP

web_render = CFG.get_url('web_render')
web_render_local = CFG.get_url('web_render_local')
Expand Down

0 comments on commit 6a19d9e

Please sign in to comment.