Skip to content

Commit

Permalink
🔖 Release 1.0.0.a1 (#80)
Browse files Browse the repository at this point in the history
* 使用 `pathlib` 替代 `os`

* 防止建立多个数据库连接对象

* 调整数据库结构 # 破坏性更新

* 格式化代码

* ➖ 去除依赖Brotli
➖ 去除开发依赖autopep8 pylint
➕ 添加开发依赖ruff black
🔥 删除.pylintrc
🎨 使用black格式化代码

* 📝 一些很赞的小牌子

* ✏️ 修正`config`变量名

* 🐛 修复OperationalError语法错误

* ➕ 添加 debug 依赖 objprint

* 🚧 数据记录器demo

* 🔥 这个init好像没什么用(

* 💡 ✏️ 修改错误的注释

* 📝 🍱 添加一个logo

* 📝 添加logo的悬浮提示

* 🙈 更新 .gitignore

* 🚨 消除了一些 init 文件中的错误警告

* ♻️ 💩 重构 IO 的 processor 模块
🐛 修复了 bind user_id 不能正确处理的bug
🎨 使用一些自定义类型和基于异常的编程(

* 🐛 忘记写try了

* 👷 将 Release CI 切换到 Python 3.11 版本

* 🎨 修改 Exception 类的变量名

* 🎨 修改捕获的 aiohttp 的错误类型

* 🎨 将 AsyncCallable 放进 typing 模块

* 🏗️ 将 recorder 装饰器中执行函数的部分放在 collector 函数中
🚧 完善数据收集部分

* 🚧 receive 记录添加 message_id 以辅助消息上下文识别

* ➕ 添加依赖 tortoise-orm

* ♻️ 🗃️ 将数据库操作替换成 tortoise-orm

* 🎨 显式传递 locals 字典

* 🎨 将装饰器封装到类里

* 🐛 忘记 exec 需要拿变量了

* 🗃️ 微调数据类型

* 🗃️ 调整数据库索引

* Bump playwright from 1.29.0 to 1.30.0 (#72)

* Bump ujson from 5.6.0 to 5.7.0 (#69)

* Bump pandas-stubs from 1.5.2.221213 to 1.5.2.230105 (#57)

* Bump types-ujson from 5.6.0.0 to 5.7.0.0 (#68)

* ✨ 存储命令历史 #58

* Bump nonebot2 from 2.0.0rc2 to 2.0.0rc3 (#73)

* Bump nonebot-adapter-onebot from 2.2.0 to 2.2.1 (#74)

* Bump tortoise-orm from 0.19.2 to 0.19.3 (#75)

* Bump black from 23.1a1 to 23.1.0 (#77)

* Bump pandas from 1.5.2 to 1.5.3 (#76)

* ⬆️ 更新 ruff

* 🔧 启用更多的检查规则

* 🎨 使用单引号编写配置文件

* 💡 为 ignore 添加注释

* 🎨 使用 ruff 规范化引号

* 🔧 启用 PEP8 命名规范检查

* 🚨 添加一些 noqa(

* 💡 添加和修改了一些注释

* 🔊 添加一条日志

* 🎨 🚨 使用 replace 替换 strip

* 🎨 🚨 规范化命名

* 🎨 格式化代码

* 🔊 修改日志等级

* 🎨 去除重复的 get_driver() 调用

* ✨ 自动安装 playwright 浏览器 close #71

* 🙈 更新 gitignore

* ✨ 将所有 playwright 相关整合进 BrowserManager 类

* 📝 更换开源许可证 (#78)

* 📝 更新 README

* Bump pandas-stubs from 1.5.2.230105 to 1.5.3.230203 (#79)

* ➕ 添加依赖 nonebot-plugin-datastore

* ✨ 使用 nonebot_plugin_datastore 提供的路径存储缓存

* Bump nonebot-plugin-datastore from 0.5.7 to 0.5.8 (#81)

* ⬆️ Bump aiohttp from 3.8.3 to 3.8.4 (#82)

Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.8.3 to 3.8.4.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](aio-libs/aiohttp@v3.8.3...v3.8.4)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump pandas-stubs from 1.5.3.230203 to 1.5.3.230214 (#84)

Bumps [pandas-stubs](https://github.com/pandas-dev/pandas-stubs) from 1.5.3.230203 to 1.5.3.230214.
- [Release notes](https://github.com/pandas-dev/pandas-stubs/releases)
- [Changelog](https://github.com/pandas-dev/pandas-stubs/blob/main/docs/release_procedure.md)
- [Commits](pandas-dev/pandas-stubs@v1.5.3.230203...v1.5.3.230214)

---
updated-dependencies:
- dependency-name: pandas-stubs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump ruff from 0.0.239 to 0.0.253 (#90)

* ⬆️ Bump playwright from 1.30.0 to 1.31.1 (#89)

* ⬆️ Bump types-ujson from 5.7.0.0 to 5.7.0.1 (#86)

* ⬆️ Bump pandas-stubs from 1.5.3.230214 to 1.5.3.230227 (#88)

* ⬆️ Bump ruff from 0.0.253 to 0.0.254 (#91)

* ⬆️ Bump pandas-stubs from 1.5.3.230227 to 1.5.3.230304 (#92)

* ⬆️ Bump mypy from 0.991 to 1.0.1 (#93)

* ⬆️ Bump mypy from 1.0.1 to 1.1.1 (#94)

* ⬆️ Bump ruff from 0.0.254 to 0.0.284 (#139)

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.254 to 0.0.284.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md)
- [Commits](astral-sh/ruff@v0.0.254...v0.0.284)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump nonebot-adapter-onebot from 2.2.1 to 2.2.4 (#137)

Bumps [nonebot-adapter-onebot](https://github.com/nonebot/adapter-onebot) from 2.2.1 to 2.2.4.
- [Release notes](https://github.com/nonebot/adapter-onebot/releases)
- [Commits](nonebot/adapter-onebot@v2.2.1...v2.2.4)

---
updated-dependencies:
- dependency-name: nonebot-adapter-onebot
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump playwright from 1.31.1 to 1.36.0 (#133)

Bumps [playwright](https://github.com/Microsoft/playwright-python) from 1.31.1 to 1.36.0.
- [Release notes](https://github.com/Microsoft/playwright-python/releases)
- [Commits](microsoft/playwright-python@v1.31.1...v1.36.0)

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump pandas-stubs from 1.5.3.230304 to 2.0.2.230605 (#124)

* ⬆️ Bump mypy from 1.1.1 to 1.5.1 (#144)

Bumps [mypy](https://github.com/python/mypy) from 1.1.1 to 1.5.1.
- [Commits](python/mypy@v1.1.1...v1.5.1)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump types-ujson from 5.7.0.1 to 5.8.0.1 (#142)

Bumps [types-ujson](https://github.com/python/typeshed) from 5.7.0.1 to 5.8.0.1.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-ujson
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump nonebot2 from 2.0.0rc3 to 2.0.1 (#141)

Bumps [nonebot2](https://github.com/nonebot/nonebot2) from 2.0.0rc3 to 2.0.1.
- [Release notes](https://github.com/nonebot/nonebot2/releases)
- [Changelog](https://github.com/nonebot/nonebot2/blob/master/CHANGELOG.md)
- [Commits](nonebot/nonebot2@v2.0.0rc3...v2.0.1)

---
updated-dependencies:
- dependency-name: nonebot2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump lxml from 4.9.2 to 4.9.3 (#140)

Bumps [lxml](https://github.com/lxml/lxml) from 4.9.2 to 4.9.3.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](lxml/lxml@lxml-4.9.2...lxml-4.9.3)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump black from 23.1.0 to 23.9.1 (#148)

Bumps [black](https://github.com/psf/black) from 23.1.0 to 23.9.1.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@23.1.0...23.9.1)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump pandas-stubs from 2.0.2.230605 to 2.0.3.230814 (#149)

Bumps [pandas-stubs](https://github.com/pandas-dev/pandas-stubs) from 2.0.2.230605 to 2.0.3.230814.
- [Changelog](https://github.com/pandas-dev/pandas-stubs/blob/main/docs/release_procedure.md)
- [Commits](pandas-dev/pandas-stubs@v2.0.2.230605...v2.0.3.230814)

---
updated-dependencies:
- dependency-name: pandas-stubs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump pandas from 1.5.3 to 2.1.1 (#152)

Bumps [pandas](https://github.com/pandas-dev/pandas) from 1.5.3 to 2.1.1.
- [Release notes](https://github.com/pandas-dev/pandas/releases)
- [Commits](pandas-dev/pandas@v1.5.3...v2.1.1)

---
updated-dependencies:
- dependency-name: pandas
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump aiohttp from 3.8.4 to 3.8.5 (#155)

Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.8.4 to 3.8.5.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/v3.8.5/CHANGES.rst)
- [Commits](aio-libs/aiohttp@v3.8.4...v3.8.5)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump ruff from 0.0.284 to 0.0.291 (#154)

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.284 to 0.0.291.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md)
- [Commits](astral-sh/ruff@v0.0.284...v0.0.291)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump playwright from 1.36.0 to 1.38.0 (#153)

Bumps [playwright](https://github.com/Microsoft/playwright-python) from 1.36.0 to 1.38.0.
- [Release notes](https://github.com/Microsoft/playwright-python/releases)
- [Commits](microsoft/playwright-python@v1.36.0...v1.38.0)

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump nonebot-plugin-datastore from 0.5.8 to 1.1.2 (#151)

Bumps [nonebot-plugin-datastore](https://github.com/he0119/nonebot-plugin-datastore) from 0.5.8 to 1.1.2.
- [Release notes](https://github.com/he0119/nonebot-plugin-datastore/releases)
- [Changelog](https://github.com/he0119/nonebot-plugin-datastore/blob/main/CHANGELOG.md)
- [Commits](he0119/nonebot-plugin-datastore@v0.5.8...v1.1.2)

---
updated-dependencies:
- dependency-name: nonebot-plugin-datastore
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump nonebot2 from 2.0.1 to 2.1.0 (#156)

Bumps [nonebot2](https://github.com/nonebot/nonebot2) from 2.0.1 to 2.1.0.
- [Release notes](https://github.com/nonebot/nonebot2/releases)
- [Changelog](https://github.com/nonebot/nonebot2/blob/master/CHANGELOG.md)
- [Commits](nonebot/nonebot2@v2.0.1...v2.1.0)

---
updated-dependencies:
- dependency-name: nonebot2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump ujson from 5.7.0 to 5.8.0 (#157)

Bumps [ujson](https://github.com/ultrajson/ultrajson) from 5.7.0 to 5.8.0.
- [Release notes](https://github.com/ultrajson/ultrajson/releases)
- [Commits](ultrajson/ultrajson@5.7.0...5.8.0)

---
updated-dependencies:
- dependency-name: ujson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⚡️ 移除无意义的async

* 🎨 修正 type hint

* ➕ 添加依赖 aiofiles

* 🎨 将文件读写操作换成 aiofiles

* ⚡️ 移除无意义的async

* 🎨 重命名一些函数

* 🎨 去除不需要的转换

* ⬆️ Bump pandas-stubs from 2.0.3.230814 to 2.1.1.230928 (#158)

Bumps [pandas-stubs](https://github.com/pandas-dev/pandas-stubs) from 2.0.3.230814 to 2.1.1.230928.
- [Changelog](https://github.com/pandas-dev/pandas-stubs/blob/main/docs/release_procedure.md)
- [Commits](pandas-dev/pandas-stubs@v2.0.3.230814...v2.1.1.230928)

---
updated-dependencies:
- dependency-name: pandas-stubs
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump nonebot2 from 2.1.0 to 2.1.1 (#159)

Bumps [nonebot2](https://github.com/nonebot/nonebot2) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/nonebot/nonebot2/releases)
- [Changelog](https://github.com/nonebot/nonebot2/blob/master/CHANGELOG.md)
- [Commits](nonebot/nonebot2@v2.1.0...v2.1.1)

---
updated-dependencies:
- dependency-name: nonebot2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ➕ 添加依赖 nonebot-plugin-orm
➕ 添加依赖 nonebot-plugin-localstore
➖ 移除依赖 nonebot-plugin-datastore

* 📌 取消 python 最高版本限制

* ⬆️ Bump objprint from 0.2.2 to 0.2.3 (#161)

Bumps [objprint](https://github.com/gaogaotiantian/objprint) from 0.2.2 to 0.2.3.
- [Release notes](https://github.com/gaogaotiantian/objprint/releases)
- [Commits](gaogaotiantian/objprint@0.2.2...0.2.3)

---
updated-dependencies:
- dependency-name: objprint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump ruff from 0.0.291 to 0.0.292 (#160)

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.291 to 0.0.292.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md)
- [Commits](astral-sh/ruff@v0.0.291...v0.0.292)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump mypy from 1.5.1 to 1.6.0 (#163)

Bumps [mypy](https://github.com/python/mypy) from 1.5.1 to 1.6.0.
- [Commits](python/mypy@v1.5.1...v1.6.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ➕ 添加依赖 httpx

* ⬆️ Bump nonebot-plugin-orm from 0.1.1 to 0.2.1 (#166)

Bumps [nonebot-plugin-orm](https://github.com/nonebot/plugin-orm) from 0.1.1 to 0.2.1.
- [Release notes](https://github.com/nonebot/plugin-orm/releases)
- [Commits](nonebot/plugin-orm@v0.1.1...v0.2.1)

---
updated-dependencies:
- dependency-name: nonebot-plugin-orm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ➕ 添加开发依赖 nonebot2

* 🎨 改为直接使用 nonebot_plugin_localstore 提供缓存路径

* 🐛 忘记 require

* 🐛 顺序错了

* 🗃️ 使用 nb orm

* 🏗️ 再次重构 IO 模块

* 🐛 忘记 push 这个了

* 🏗️ 将 request 改成通用的

* ⬆️ Bump nonebot-plugin-orm from 0.2.1 to 0.2.2 (#167)

Bumps [nonebot-plugin-orm](https://github.com/nonebot/plugin-orm) from 0.2.1 to 0.2.2.
- [Release notes](https://github.com/nonebot/plugin-orm/releases)
- [Commits](nonebot/plugin-orm@v0.2.1...v0.2.2)

---
updated-dependencies:
- dependency-name: nonebot-plugin-orm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump ruff from 0.0.292 to 0.1.0 (#168)

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.292 to 0.1.0.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@v0.0.292...v0.1.0)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump nonebot-adapter-onebot from 2.3.0 to 2.3.1 (#165)

Bumps [nonebot-adapter-onebot](https://github.com/nonebot/adapter-onebot) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/nonebot/adapter-onebot/releases)
- [Commits](nonebot/adapter-onebot@v2.3.0...v2.3.1)

---
updated-dependencies:
- dependency-name: nonebot-adapter-onebot
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* 🏗️ 重构 TOS 模块

* 🩹 补充返回值类型标注

* 🐛 写错变量了

* 🐛 缺个 else

* 🐛 忘记声明变量

* 🐛 忘记初始化变量

* 🎨 去除不需要的 else

* 🎨 去除不需要的判断

* 🎨 减少一次函数调用

* 🐛 写错命令了

* ⬆️ Bump nonebot-plugin-orm from 0.2.2 to 0.2.3 (#170)

Bumps [nonebot-plugin-orm](https://github.com/nonebot/plugin-orm) from 0.2.2 to 0.2.3.
- [Release notes](https://github.com/nonebot/plugin-orm/releases)
- [Commits](nonebot/plugin-orm@v0.2.2...v0.2.3)

---
updated-dependencies:
- dependency-name: nonebot-plugin-orm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump black from 23.9.1 to 23.10.0 (#171)

Bumps [black](https://github.com/psf/black) from 23.9.1 to 23.10.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@23.9.1...23.10.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump mypy from 1.6.0 to 1.6.1 (#172)

Bumps [mypy](https://github.com/python/mypy) from 1.6.0 to 1.6.1.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](python/mypy@v1.6.0...v1.6.1)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump playwright from 1.38.0 to 1.39.0 (#169)

Bumps [playwright](https://github.com/Microsoft/playwright-python) from 1.38.0 to 1.39.0.
- [Release notes](https://github.com/Microsoft/playwright-python/releases)
- [Commits](microsoft/playwright-python@v1.38.0...v1.39.0)

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ➖ 去除开发依赖 lxml-stubs
➕ 添加开发依赖 types-lxml

* 🏗️ 重构 TOP 模块

* 🐛 忘记传参了

* 🐛 忘记判断有没有绑定了

* 🎨 忘记用封好的函数了

* 📝 把 wakatime 的小牌牌放上去 并且格式化

* ⬆️ Bump ruff from 0.1.0 to 0.1.1 (#174)

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.0 to 0.1.1.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@v0.1.0...v0.1.1)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump nonebot-plugin-orm from 0.2.3 to 0.2.4 (#173)

Bumps [nonebot-plugin-orm](https://github.com/nonebot/plugin-orm) from 0.2.3 to 0.2.4.
- [Release notes](https://github.com/nonebot/plugin-orm/releases)
- [Commits](nonebot/plugin-orm@v0.2.3...v0.2.4)

---
updated-dependencies:
- dependency-name: nonebot-plugin-orm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* 🏗️ 把 config 从 utils 里拿出来

* 🔥 orm 搞错用法了

* 🗃️ 创建新的迁移脚本

* ✨ 添加插件元数据

* 🐛 导包顺序又错了

* ➕ 添加依赖 nonebot-adapter-qq

* ➕ 添加依赖 nonebot-plugin-alconna

* ➖ 移除依赖 tortoise-orm

* ⬆️ Bump nonebot-plugin-orm from 0.2.4 to 0.3.0 (#175)

* ⬆️ Bump types-lxml from 2023.3.28 to 2023.10.21 (#176)

* ⬆️ Bump black from 23.10.0 to 23.10.1 (#177)

* ⬆️ Bump ruff from 0.1.1 to 0.1.2 (#178)

* ➕ 添加debug依赖 viztracer

* ➕ 添加开发依赖 nonebot-plugin-orm[default]

* ✨ IO 基础查询功能适配所有平台

* ⬆️ Bump nonebot-plugin-alconna from 0.30.3 to 0.30.6 (#179)

Bumps [nonebot-plugin-alconna](https://github.com/nonebot/plugin-alconna) from 0.30.3 to 0.30.6.
- [Release notes](https://github.com/nonebot/plugin-alconna/releases)
- [Commits](nonebot/plugin-alconna@v0.30.3...v0.30.6)

---
updated-dependencies:
- dependency-name: nonebot-plugin-alconna
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* 🩹 防止在使用其他命令的时候意外触发

* 🚧 暂时去除记录器 待重构

* 🐛 修正输出信息格式

* ✨ TOP 基础查询功能适配所有平台

* ⬆️ Bump ruff from 0.1.2 to 0.1.3 (#180)

* ⬆️ Bump nonebot-plugin-alconna from 0.30.6 to 0.30.7 (#181)

* ✨ TOS 基础查询功能适配所有平台

* 🐛 修复一些输出消息问题

* 🔥 删除一些不需要的常量

* 🔥 把手搓的解析器爆了

* 🏷️ 添加一个不知道有什么用的类型注释

* 🎨 从 black 迁移 到 ruff format
➖ 删除开发依赖 black

* ✨ 启用 pyupgrade 规则

* ✨ 启用 flake8-2020 规则

* ✨ 启用 flake8-annotations 规则

* ✨ 启用 flake8-async 规则

* ✨ 启用 flake8-bandit 规则

* ✨ 启用 flake8-blind-except 规则

* ✨ 启用 flake8-boolean-trap 规则

* ✨ 启用 flake8-builtins 规则

* ✨ 启用 flake8-datetimez 规则

* ✨ 启用 flake8-future-annotations 规则

* ✨ 启用 flake8-implicit-str-concat 规则

* ✨ 启用 flake8-pie 规则

* ✨ 启用 flake8-print 规则

* ✨ 启用 flake8-raise 规则

* ✨ 启用 flake8-return 规则

* ✨ 启用 flake8-simplify 规则

* ✨ 启用 flake8-use-pathlib 规则

* ✨ 启用 pandas-vet 规则

* ✨ 启用 tryceratops 规则

* ✨ 启用 flynt 规则

* ✨ 启用 Perflint 规则

* ⬆️ Bump nonebot-plugin-alconna from 0.30.7 to 0.31.0 (#183)

Bumps [nonebot-plugin-alconna](https://github.com/nonebot/plugin-alconna) from 0.30.7 to 0.31.0.
- [Release notes](https://github.com/nonebot/plugin-alconna/releases)
- [Commits](nonebot/plugin-alconna@v0.30.7...v0.31.0)

---
updated-dependencies:
- dependency-name: nonebot-plugin-alconna
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump nonebot-plugin-orm from 0.3.0 to 0.4.0 (#182)

* ⬆️ Bump nonebot-plugin-orm from 0.4.0 to 0.4.1 (#186)

Bumps [nonebot-plugin-orm](https://github.com/nonebot/plugin-orm) from 0.4.0 to 0.4.1.
- [Release notes](https://github.com/nonebot/plugin-orm/releases)
- [Commits](nonebot/plugin-orm@v0.4.0...v0.4.1)

---
updated-dependencies:
- dependency-name: nonebot-plugin-orm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump nonebot2 from 2.1.1 to 2.1.2 (#185)

Bumps [nonebot2](https://github.com/nonebot/nonebot2) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/nonebot/nonebot2/releases)
- [Changelog](https://github.com/nonebot/nonebot2/blob/master/CHANGELOG.md)
- [Commits](nonebot/nonebot2@v2.1.1...v2.1.2)

---
updated-dependencies:
- dependency-name: nonebot2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump nonebot-plugin-alconna from 0.31.0 to 0.31.3 (#187)

Bumps [nonebot-plugin-alconna](https://github.com/nonebot/plugin-alconna) from 0.31.0 to 0.31.3.
- [Release notes](https://github.com/nonebot/plugin-alconna/releases)
- [Commits](nonebot/plugin-alconna@v0.31.0...v0.31.3)

---
updated-dependencies:
- dependency-name: nonebot-plugin-alconna
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* 🐛 修复拼接 url 的 bug

* ⬆️ Bump nonebot-plugin-orm from 0.4.1 to 0.5.0 (#189)

Bumps [nonebot-plugin-orm](https://github.com/nonebot/plugin-orm) from 0.4.1 to 0.5.0.
- [Release notes](https://github.com/nonebot/plugin-orm/releases)
- [Commits](nonebot/plugin-orm@v0.4.1...v0.5.0)

---
updated-dependencies:
- dependency-name: nonebot-plugin-orm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump nonebot-plugin-alconna from 0.31.3 to 0.31.7 (#191)

Bumps [nonebot-plugin-alconna](https://github.com/nonebot/plugin-alconna) from 0.31.3 to 0.31.7.
- [Release notes](https://github.com/nonebot/plugin-alconna/releases)
- [Commits](nonebot/plugin-alconna@v0.31.3...v0.31.7)

---
updated-dependencies:
- dependency-name: nonebot-plugin-alconna
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump ruff from 0.1.3 to 0.1.4 (#190)

* ⬆️ Bump httpx from 0.25.0 to 0.25.1 (#188)

* ✨ 绑定适配所有平台

* ⬆️ Bump nonebot-plugin-alconna from 0.31.7 to 0.32.0 (#192)

Bumps [nonebot-plugin-alconna](https://github.com/nonebot/plugin-alconna) from 0.31.7 to 0.32.0.
- [Release notes](https://github.com/nonebot/plugin-alconna/releases)
- [Commits](nonebot/plugin-alconna@v0.31.7...v0.32.0)

---
updated-dependencies:
- dependency-name: nonebot-plugin-alconna
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ♻️ 重构 recorder

* ➕ 添加依赖 nonebot-plugin-apscheduler

* ⬆️ Bump mypy from 1.6.1 to 1.7.0 (#194)

* ⬆️ Bump ruff from 0.1.4 to 0.1.5 (#193)

* ✨ 将数据库内存储时间时区切换为UTC

* ✨ 添加 iorank 指令

* 🎨 将行长限制改为120

* 🥚 :fkosk:

* 🗃️ 迁移旧版本 sqlite 中的数据

* 🚨 添加 type: ignore

* ✨ 更新 PluginMetadata

* ➖ 移除所有 nonebot-adapter 依赖

* ➖ 移除依赖 aiohttp

* ➖ 移除依赖 asyncio
(为什么会有这个)

* ➕ 添加开发依赖 nonebot-adapter-onebot

* ➕ 添加开发依赖 nonebot-adapter-satori

* 📝 更新 readme

* 🔖 1.0.0.a1

* 🔒️ 修复 Incomplete URL substring sanitization

* 🔒️ 修复 Incomplete URL substring sanitization

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
shoucandanghehe and dependabot[bot] authored Nov 13, 2023
1 parent cced0ca commit ca8ab58
Show file tree
Hide file tree
Showing 49 changed files with 5,025 additions and 2,504 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- name: Install Poetry
shell: bash
run: |
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
.idea
dist
test*
test_*
Untitled*
*copy*
.vscode
*dev*
*cache*
*backup*
*.pyc
31 changes: 0 additions & 31 deletions .pylintrc

This file was deleted.

682 changes: 661 additions & 21 deletions LICENSE

Large diffs are not rendered by default.

113 changes: 74 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,89 @@
TETRIS Stats
============
<div align="center">

一个基于nonebot2的用于查询TETRIS相关游戏玩家数据的插件
目前支持
* [TETR.IO](https://tetr.io/)
* [茶服](https://teatube.cn/tos/)
* [TOP](http://tetrisonline.pl/)
<p align="center">
<img src="img/logo.svg" width="200" height="200" alt="logo" title="Tetris Stats"></a>
</p>

安装
----
# Tetris Stats

* 使用 nb-cli
```
✨ 一款基于 [NoneBot2](https://github.com/nonebot/nonebot2) 的用于查询 Tetris 相关游戏玩家数据的插件 ✨

</div>

<p align="center">
<a href="https://github.com/shoucandanghehe/nonebot-plugin-tetris-stats/blob/main/LICENSE">
<img
src="https://img.shields.io/github/license/shoucandanghehe/nonebot-plugin-tetris-stats"
alt="License"
/>
</a>
<a href="https://www.python.org/">
<img
src="https://img.shields.io/badge/Python-3.10+-blue"
alt="Python"
/>
</a>
<a href="https://pypi.python.org/pypi/nonebot-plugin-tetris-stats">
<img
src="https://img.shields.io/pypi/v/nonebot-plugin-tetris-stats"
alt="PyPi"
/>
</a>
<a href="https://github.com/charliermarsh/ruff">
<img
src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json"
alt="Ruff"
/>
</a>
<a href="https://gitmoji.dev">
<img
src="https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=flat-square"
alt="Gitmoji"
/>
</a>
<a href="https://wakatime.com/badge/user/138b2226-8e02-42be-b99d-35c05198836f/project/65f5bdf7-45ec-479a-8dd2-18c498c910ca">
<img
src="https://wakatime.com/badge/user/138b2226-8e02-42be-b99d-35c05198836f/project/65f5bdf7-45ec-479a-8dd2-18c498c910ca.svg"
alt="wakatime"
/>
</a>
</p>

## ✨ 目前支持的游戏

- [TETR.IO](https://tetr.io/)
- [茶服](https://teatube.cn/tos/)
- [TOP](http://tetrisonline.pl/)

## 🚀 安装

- 使用 nb-cli

```bash
nb plugin install nonebot-plugin-tetris-stats
```

* 使用 pip
```
pip install nonebot-plugin-tetris-stats
```
* 对于 Windows
```
# CMD or PowerShell
playwright install firefox
```
* 对于 Linux
```
# 似乎 playwright官方 只支持 Ubuntu, 如果你是其他系统请自行尝试解决依赖问题
playwright install firefox
playwright install-deps firefox
- 使用 poetry

```bash
poetry add nonebot-plugin-tetris-stats
```

使用
----
- 使用 pip ~~不推荐~~

参考NoneBot2文档 [加载插件](https://v2.nonebot.dev/docs/tutorial/plugin/load-plugin/)
```bash
pip install nonebot-plugin-tetris-stats
```

依赖
----
## ♿️ 使用

目前只支持 `OneBot V11` 协议
- 参考 NoneBot2 文档 [加载插件](https://nonebot.dev/docs/tutorial/create-plugin#%E5%8A%A0%E8%BD%BD%E6%8F%92%E4%BB%B6)

鸣谢
----
## 🎉 鸣谢

* [NoneBot2](https://v2.nonebot.dev/)
* [OneBot](https://onebot.dev/)
* [go-cqhttp](https://github.com/Mrs4s/go-cqhttp/)
- [NoneBot2](https://v2.nonebot.dev/)
- 所有为机器人生态做出贡献的人❤️

开源
----
## 📝 开源

本项目使用[MIT](https://github.com/shoucandanghehe/nonebot-plugin-tetris-stats/blob/main/LICENSE)许可证开源
本项目使用 [AGPL-3.0](https://github.com/shoucandanghehe/nonebot-plugin-tetris-stats/blob/main/LICENSE) 许可证开源
7 changes: 7 additions & 0 deletions img/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 22 additions & 1 deletion nonebot_plugin_tetris_stats/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
from . import game_data_processor
from nonebot import require
from nonebot.plugin import PluginMetadata

require('nonebot_plugin_localstore')
require('nonebot_plugin_orm')
require('nonebot_plugin_alconna')
require('nonebot_plugin_apscheduler')

from .config.config import migrations # noqa: E402

__plugin_meta__ = PluginMetadata(
name='Tetris Stats',
description='一个用于查询 Tetris 相关游戏玩家数据的插件',
usage='发送 {游戏名} --help 查询使用方法',
type='application',
homepage='https://github.com/shoucandanghehe/nonebot-plugin-tetris-stats',
extra={
'orm_version_location': migrations,
},
)

from . import game_data_processor # noqa: F401, E402
14 changes: 14 additions & 0 deletions nonebot_plugin_tetris_stats/config/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from pathlib import Path

from nonebot_plugin_localstore import get_cache_dir # type: ignore[import-untyped]
from pydantic import BaseModel

from . import migrations # noqa: F401

CACHE_PATH: Path = get_cache_dir('nonebot_plugin_tetris_stats')


class Config(BaseModel):
"""配置类"""

db_url: str = 'sqlite://data/nonebot_plugin_tetris_stats/data.db'
139 changes: 139 additions & 0 deletions nonebot_plugin_tetris_stats/config/migrations/9866f53ce44f_init_db.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
"""init db
迁移 ID: 9866f53ce44f
父迁移:
创建时间: 2023-11-11 16:24:11.826667
"""
from __future__ import annotations

from collections.abc import Sequence

import sqlalchemy as sa
from alembic import op

revision: str = '9866f53ce44f'
down_revision: str | Sequence[str] | None = None
branch_labels: str | Sequence[str] | None = ('nonebot_plugin_tetris_stats',)
depends_on: str | Sequence[str] | None = None


def upgrade(name: str = '') -> None:
if name:
return
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
'nonebot_plugin_tetris_stats_bind',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('chat_platform', sa.String(length=32), nullable=False),
sa.Column('chat_account', sa.String(), nullable=False),
sa.Column('game_platform', sa.String(length=32), nullable=False),
sa.Column('game_account', sa.String(), nullable=False),
sa.PrimaryKeyConstraint('id', name=op.f('pk_nonebot_plugin_tetris_stats_bind')),
)
with op.batch_alter_table('nonebot_plugin_tetris_stats_bind', schema=None) as batch_op:
batch_op.create_index(
batch_op.f('ix_nonebot_plugin_tetris_stats_bind_chat_account'),
['chat_account'],
unique=False,
)
batch_op.create_index(
batch_op.f('ix_nonebot_plugin_tetris_stats_bind_chat_platform'),
['chat_platform'],
unique=False,
)

op.create_table(
'nonebot_plugin_tetris_stats_historicaldata',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('trigger_time', sa.DateTime(), nullable=False),
sa.Column('bot_platform', sa.String(length=32), nullable=True),
sa.Column('bot_account', sa.String(), nullable=True),
sa.Column('source_type', sa.String(length=32), nullable=True),
sa.Column('source_account', sa.String(), nullable=True),
sa.Column('message', sa.PickleType(), nullable=True),
sa.Column('game_platform', sa.String(length=32), nullable=False),
sa.Column('command_type', sa.String(length=16), nullable=False),
sa.Column('command_args', sa.JSON(), nullable=False),
sa.Column('game_user', sa.PickleType(), nullable=False),
sa.Column('processed_data', sa.PickleType(), nullable=False),
sa.Column('finish_time', sa.DateTime(), nullable=False),
sa.PrimaryKeyConstraint('id', name=op.f('pk_nonebot_plugin_tetris_stats_historicaldata')),
)
with op.batch_alter_table('nonebot_plugin_tetris_stats_historicaldata', schema=None) as batch_op:
batch_op.create_index(
batch_op.f('ix_nonebot_plugin_tetris_stats_historicaldata_command_type'),
['command_type'],
unique=False,
)
batch_op.create_index(
batch_op.f('ix_nonebot_plugin_tetris_stats_historicaldata_game_platform'),
['game_platform'],
unique=False,
)
batch_op.create_index(
batch_op.f('ix_nonebot_plugin_tetris_stats_historicaldata_source_account'),
['source_account'],
unique=False,
)
batch_op.create_index(
batch_op.f('ix_nonebot_plugin_tetris_stats_historicaldata_source_type'),
['source_type'],
unique=False,
)

op.create_table(
'nonebot_plugin_tetris_stats_iorank',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('rank', sa.String(length=2), nullable=False),
sa.Column('tr_line', sa.Float(), nullable=False),
sa.Column('player_count', sa.Integer(), nullable=False),
sa.Column('low_pps', sa.JSON(), nullable=False),
sa.Column('low_apm', sa.JSON(), nullable=False),
sa.Column('low_vs', sa.JSON(), nullable=False),
sa.Column('avg_pps', sa.Float(), nullable=False),
sa.Column('avg_apm', sa.Float(), nullable=False),
sa.Column('avg_vs', sa.Float(), nullable=False),
sa.Column('high_pps', sa.JSON(), nullable=False),
sa.Column('high_apm', sa.JSON(), nullable=False),
sa.Column('high_vs', sa.JSON(), nullable=False),
sa.Column('create_time', sa.DateTime(), nullable=False),
sa.PrimaryKeyConstraint('id', name=op.f('pk_nonebot_plugin_tetris_stats_iorank')),
)
with op.batch_alter_table('nonebot_plugin_tetris_stats_iorank', schema=None) as batch_op:
batch_op.create_index(
batch_op.f('ix_nonebot_plugin_tetris_stats_iorank_create_time'),
['create_time'],
unique=False,
)
batch_op.create_index(
batch_op.f('ix_nonebot_plugin_tetris_stats_iorank_rank'),
['rank'],
unique=False,
)

# ### end Alembic commands ###


def downgrade(name: str = '') -> None:
if name:
return
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('nonebot_plugin_tetris_stats_iorank', schema=None) as batch_op:
batch_op.drop_index(batch_op.f('ix_nonebot_plugin_tetris_stats_iorank_rank'))
batch_op.drop_index(batch_op.f('ix_nonebot_plugin_tetris_stats_iorank_create_time'))

op.drop_table('nonebot_plugin_tetris_stats_iorank')
with op.batch_alter_table('nonebot_plugin_tetris_stats_historicaldata', schema=None) as batch_op:
batch_op.drop_index(batch_op.f('ix_nonebot_plugin_tetris_stats_historicaldata_source_type'))
batch_op.drop_index(batch_op.f('ix_nonebot_plugin_tetris_stats_historicaldata_source_account'))
batch_op.drop_index(batch_op.f('ix_nonebot_plugin_tetris_stats_historicaldata_game_platform'))
batch_op.drop_index(batch_op.f('ix_nonebot_plugin_tetris_stats_historicaldata_command_type'))

op.drop_table('nonebot_plugin_tetris_stats_historicaldata')
with op.batch_alter_table('nonebot_plugin_tetris_stats_bind', schema=None) as batch_op:
batch_op.drop_index(batch_op.f('ix_nonebot_plugin_tetris_stats_bind_chat_platform'))
batch_op.drop_index(batch_op.f('ix_nonebot_plugin_tetris_stats_bind_chat_account'))

op.drop_table('nonebot_plugin_tetris_stats_bind')
# ### end Alembic commands ###
Loading

0 comments on commit ca8ab58

Please sign in to comment.