26 Commits

Author SHA1 Message Date
c84e3538bc
🏷️ update type hints 3 2024-11-28 00:22:34 +08:00
fdfad8a6c7
🏷️ update type hints 2 2024-11-26 00:03:43 +08:00
2c605fc2dc
🏷️ update type hints 2024-11-25 14:35:32 +08:00
97a0f04808
添加 Cookie 组件 (#633)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-10-31 12:56:15 +08:00
Azide
32e3bcc022
🐛 修正项目的代码警告 (#614)
* 🐛 调整ruff的pytest警告

* 🐛 调整导入关系警告

* 🐛 删除奇怪无用的赋值和取值逻辑

*  不同测试部分所用变量应加以区分

* 🐛 subs_io model添加默认值

* 🐛 修完所有的 ruff PT001 警告

* 🔧 按ruff建议修改ruff配置

warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`:
  - 'ignore' -> 'lint.ignore'
  - 'select' -> 'lint.select'

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-17 18:24:20 +08:00
pre-commit-ci[bot]
ddc5e0eed7
⬆️ auto update by pre-commit hooks (#521)
* ⬆️ auto update by pre-commit hooks

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.2.0 → v0.3.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.0...v0.3.5)
- [github.com/psf/black: 24.1.1 → 24.3.0](https://github.com/psf/black/compare/24.1.1...24.3.0)
- [github.com/pre-commit/mirrors-eslint: v9.0.0-beta.1 → v9.0.0-rc.0](https://github.com/pre-commit/mirrors-eslint/compare/v9.0.0-beta.1...v9.0.0-rc.0)

* 💄 auto fix by pre-commit hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-02 15:07:29 +08:00
pre-commit-ci[bot]
9b514263aa
⬆️ auto update by pre-commit hooks (#465)
* ⬆️ auto update by pre-commit hooks

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.9 → v0.2.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.9...v0.2.0)
- [github.com/psf/black: 23.12.1 → 24.1.1](https://github.com/psf/black/compare/23.12.1...24.1.1)
- [github.com/pre-commit/mirrors-eslint: v9.0.0-alpha.0 → v9.0.0-alpha.2](https://github.com/pre-commit/mirrors-eslint/compare/v9.0.0-alpha.0...v9.0.0-alpha.2)

* 💄 auto fix by pre-commit hooks

* 💄 auto fix by pre-commit hooks

* 🐛 fix some merge error

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Azide <rukuy@qq.com>
2024-03-17 17:21:23 +08:00
uy/sun
b6e68730b7
⬆️ 适配 Pydantic V2 (#484)
* ⬆️ 适配 Pydantic V2

* 🐛 修复测试报错

* 🐛 适配忘记的 from_orm

* 🐛 忘记的 class-based `config`

* 🐛 更新 red 适配器版本
2024-02-29 19:21:25 +08:00
pre-commit-ci[bot]
f6ee4a4c1b
⬆️ auto update by pre-commit hooks (#416)
* ⬆️ auto update by pre-commit hooks

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.292 → v0.1.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.292...v0.1.9)
- [github.com/pycqa/isort: 5.12.0 → 5.13.2](https://github.com/pycqa/isort/compare/5.12.0...5.13.2)
- [github.com/psf/black: 23.9.1 → 23.12.1](https://github.com/psf/black/compare/23.9.1...23.12.1)
- [github.com/pre-commit/mirrors-prettier: v3.0.3 → v4.0.0-alpha.8](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.3...v4.0.0-alpha.8)
- [github.com/pre-commit/mirrors-eslint: v8.50.0 → v9.0.0-alpha.0](https://github.com/pre-commit/mirrors-eslint/compare/v8.50.0...v9.0.0-alpha.0)

* 💄 auto fix by pre-commit hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-02 10:24:42 +08:00
felinae98
badb26419e ⬆️ upgrade nonebot_plugin_saa 2023-11-22 10:44:51 +08:00
pre-commit-ci[bot]
ffa180e8a6 💄 auto fix by pre-commit hooks 2023-10-15 23:18:33 +08:00
uy/sun
d591cd3486
sparkles: 适配 SAA 0.3 (#349)
*  适配 SAA 0.3

* 🎨 格式化代码
2023-08-27 16:30:30 +08:00
Azide
bf788ff72a 🚨 移除noqa: E501
💄 auto fix by pre-commit hooks
2023-07-18 21:43:25 +08:00
Azide
e50eb5d70b 👷 添加ruff actions
🐛 分支应该是main而不是master

💄 auto fix by pre-commit hooks

🔥 dependabot.yml的registrys需要token,先删除
2023-07-18 21:43:25 +08:00
Azide
dba8f2a9cb 🎨 按ruff的检查调整程序代码 2023-07-18 21:43:25 +08:00
Cinte
7dacae379a 🐛 在Postgresql下,user_target字段使用jsonb代替json 2023-06-10 12:55:43 +08:00
AzideCupric
39c045c63f subs-io适配引入saa后的新数据库结构 (#219的subs-io部分) (#224)
* 🚚 将nbesf_model统一放到目录中

*  添加v2版本的nbesf

*  使subs_import支持导入多个版本的nbesf文件

*  使用saa的AllSupportedPlatformTarget

* 🚧 use deserialize

---------

Co-authored-by: felinae98 <731499577@qq.com>
2023-06-06 03:30:50 +08:00
felinae98
4118329bb0 🚧 remove User type 2023-06-06 03:30:50 +08:00
felinae98
d535f5212d 🗃️ add user_target column 2023-06-06 03:30:50 +08:00
felinae98
f16ca6db8b 🧑‍💻 fix type hinting 2023-04-01 19:57:18 +08:00
AzideCupric
4e304a43b1
通过 nb-cli 实现数据库一键导入导出 (#210)
* feat: 实现导出存储的订阅信息的功能

* test: 编写导出功能测试

* test: 使用tmp_path

* feat: 实现导入订阅文件功能

* refactor: 将订阅导入导出部分独立出来

* fix: 修复一些拼写错误
test: 完成import的第一个测试

* feat: 将订阅导入导出函数加入nb script

test: 添加cli测试

* test: 完善subs import测试

* 🐛 fix nb cli entrypoint name error

* fix: 修改错误的entry_point, 关闭yaml导出时对键名的排序

* fix: 使用更简短的命令名

* 🚚 将subs_io迁移到config下

* ♻️ 不再使用抛出异常的方式创建目录

* refactor: 将subscribe_export类转为函数

* refactor: 将subscribe_import类转为函数

* refactor: 根据重写的subs_io重新调整cli

* test: 调整重写subs_io后的test

* chore: 清理未使用的import内容

* feat(cli): 将--yaml更改为--format

* test: 调整测试

* fix(cli): 为import添加不支持格式的报错

*  improve export performace

* feat: subscribes_import函数不再需要传入参数函数,而是指定为add_subscribes

fix: nbesf_parser在传入str时将调用parse_raw, 否则调用parse_obj

* feat: subscribes_import现在会根据nbesf_data的版本选择合适的导入方式

* fix(test): 调整测试

* feat: nb bison export命令不再将文件导出到data目录,而是当前工作目录

* docs: 增添相关文档

* fix(test): 修复错误的变量名

---------

Co-authored-by: felinae98 <731499577@qq.com>
2023-03-19 16:29:05 +08:00
felinae98
010e6335f2 🐛 register db hook after init scheduler 2023-03-12 20:24:00 +08:00
felinae98
45b4ac3988 🗃️ alter fields to not null, fix typing 2023-03-09 19:25:29 +08:00
felinae98
88bb1d3698 🚚 move db_migration code 2023-03-09 19:25:29 +08:00
uy/sun
9581887994
🎨 调整旧版数据库加载逻辑 (#212) 2023-03-09 17:58:26 +08:00
uy/sun
90816796c7
🚚 修改 nonebot_bison 项目结构 (#211)
* 🎨 修改 nonebot_bison 目录位置

* auto fix by pre-commit hooks

* 🚚 fix frontend build target

* 🚚 use soft link

* Revert "🚚 use soft link"

This reverts commit de21f79d5ae1bd5515b04f42a4138cb25ddf3e62.

* 🚚 modify dockerfile

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: felinae98 <731499577@qq.com>
2023-03-09 17:32:51 +08:00