优化 senddrawsearch 系列函数和change_setting以及remove_parentheses函数,删除flask依赖,添加uuid依赖#16
Open
TwoCreepers wants to merge 15 commits into
Open
优化 senddrawsearch 系列函数和change_setting以及remove_parentheses函数,删除flask依赖,添加uuid依赖#16TwoCreepers wants to merge 15 commits into
senddrawsearch 系列函数和change_setting以及remove_parentheses函数,删除flask依赖,添加uuid依赖#16TwoCreepers wants to merge 15 commits into
Conversation
添加更详细的类型注解
…-> None` 因为这个返回值固定为0并且根本没有地方用到
Collaborator
提取公共内容为`draw_v2` 加入类型标注 改动: - 仅`debug`为True时打印`decoded`和`image_url` - 优化部分错误和debug输出的文本使其更加清晰 - 不在用简单随机数做图片名而是使用`uuid.uuid4().hex`
- 加入类型标注 - 优化错误输出信息
send 和 draw 系列函数和change_setting函数并删除flask依赖
send 和 draw 系列函数和change_setting函数并删除flask依赖send 和 draw 系列函数和change_setting以及remove_parentheses函数并删除flask依赖
send 和 draw 系列函数和change_setting以及remove_parentheses函数并删除flask依赖send 和 draw 系列函数和change_setting以及remove_parentheses函数,删除flask依赖,添加uuid依赖
send 和 draw 系列函数和change_setting以及remove_parentheses函数,删除flask依赖,添加uuid依赖senddrawsearch 系列函数和change_setting以及remove_parentheses函数,删除flask依赖,添加uuid依赖
Collaborator
Author
|
要暑假了,该刷刷KPI了(doge) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
优化
senddrawsearch系列函数和change_setting以及remove_parentheses函数,删除flask依赖,添加uuid依赖,修改部分配置的默认值优化
send系列函数相关提交:
d3c354c59124eaa9d3542cc9b0d43465dad90231f9内容:
send_file_v2和send_msg_v2这两个底层抽象以封装msg_type的比较和部分json构造send_xxx函数仍然保留并更改内部实现print_log_for_send_func以抽象send函数的日志打印send_msg(resp_dict : dict) -> int改为send_msg(resp_dict : dict) -> None因为这个返回值固定为0并且根本没有地方用到优化
draw系列函数相关提交:
d9e9c39fea841f内容:
draw_v2uuid.uuid4().hex,以规避可能产生的图片名碰撞优化
change_setting函数相关提交:
0fcf595内容:
优化
remove_parentheses函数相关提交:
1d655bb内容:
list[str]中返回时使用''.join拼接,以提高效率优化
search系列函数相关提交:
5b367021a71314内容:
search_func_list注入函数依赖,以方便添加备用搜索函数删除
flask依赖相关提交
31ee803内容:
由于内部实现以更改成直接读取文件而不是通过使用
flask构造的HTTP文件服务器来中转文件,flask依赖完全可以彻底删除,以减少项目依赖树大小添加
uuid依赖相关提交
d9e9c39内容:
由于相关提交
d9e9c39中修改了生成图片名逻辑,引入该依赖,该库是一个Python 2.5标准中引入的一个内置库修改配置默认值
全局变量
ttsurls改为http://localhost:5001/tts相关提交:
18b1afc