From 290289c9176be95db34fad827b4fd268641254aa Mon Sep 17 00:00:00 2001 From: MarkusJoe Date: Thu, 10 Feb 2022 13:17:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95heroku=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 4 ++-- bin/core/b64img.py | 4 ++-- bin/core/error.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app.py b/app.py index 157eb95..6faedc6 100644 --- a/app.py +++ b/app.py @@ -23,7 +23,7 @@ app.config['JSON_SORT_KEYS'] = False # 设置JSON消息不根据字母顺序重 app.config['JSON_AS_ASCII'] = False # 设置JSON消息显示中文 -def build_page(name: str, length: int, theme: str) -> list[bool | Response] | list[bool | str] | bool: +def build_page(name: str, length: int, theme: str) -> list[bool or Response] or list[bool or str] or bool: """ 渲染最终的页面 :param theme: @@ -46,7 +46,7 @@ def build_page(name: str, length: int, theme: str) -> list[bool | Response] | li @app.route('/get', methods=['GET', 'POST']) # 允许 GET 和 POST 方法 -def api_page() -> Response | str: +def api_page() -> Response or str: """ API 页面函数 :return: diff --git a/bin/core/b64img.py b/bin/core/b64img.py index 49b7a4f..4ed5d6f 100644 --- a/bin/core/b64img.py +++ b/bin/core/b64img.py @@ -11,8 +11,8 @@ from typing import Any from db.db import fetch_table -def re_sort_number_image(origin_number: str, theme: str) -> tuple[bool, bool, bool, bool] | list[ - bool | list[Any] | Any]: +def re_sort_number_image(origin_number: str, theme: str) -> tuple[bool, bool, bool, bool] or list[ + bool or list[Any] or Any]: """ 返回一个排列好的svg base64代码列表 :param theme: diff --git a/bin/core/error.py b/bin/core/error.py index b8bba44..5c29ca7 100644 --- a/bin/core/error.py +++ b/bin/core/error.py @@ -17,7 +17,7 @@ class ErrorProcess: 'msg': '', 'data': None} - def get_theme_list(self): + def get_theme_list(self) -> Response: """ 直接获取可选主题 :return: