引入pylint对代码进行检查

代码规范:使用PEP8推荐的命名规范
删除Request模块,改为每个游戏的processor单独实现,因为每个游戏的api请求都不太一样
对于io_data_processor:
1. 引入了playwright以应对api套的cloudflare五秒盾
对于top_data_processor:
1. 添加了lxml和pandas的stubs库,并修复了所有type hint错误
对于sql:
1. 使用全局变量保存数据库连接对象,理论上运行一次只会连接一次数据库
2. 移动初始化数据库的hook函数到sql.py
其他:
优化代码
版本推进
This commit is contained in:
scdhh
2022-08-06 00:56:05 +00:00
parent 5807a8c5fc
commit 88ba7cd3af
19 changed files with 1494 additions and 883 deletions

View File

@@ -5,24 +5,30 @@ TETRIS Stats
目前支持
* [TETR.IO](https://tetr.io/)
* [茶服](https://teatube.cn/tos/)
计划支持
* [TOP](http://tetrisonline.pl/)
安装
----
* 使用 nb-cli(推荐)
* 使用 nb-cli
```
nb plugin install nonebot-plugin-tetris-stats
```
* 使用 pip(不推荐)
* 使用 pip
```
pip install nonebot-plugin-tetris-stats
# 修改bot.py
```
* 对于 Windows
```
# CMD or PowerShell
playwright install firefox
```
* 对于 Linux
```
# 似乎 playwright官方 只支持 Ubuntu, 如果你是其他系统请自行尝试解决依赖问题
playwright install firefox
playwright install-deps firefox
```
使用