mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-02 09:26:12 +08:00
⬆️ 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>
This commit is contained in:
parent
d2d5597345
commit
9b514263aa
@ -7,7 +7,7 @@ ci:
|
||||
autoupdate_commit_msg: ":arrow_up: auto update by pre-commit hooks"
|
||||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.1.9
|
||||
rev: v0.2.0
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: [--fix, --exit-non-zero-on-fix]
|
||||
@ -20,7 +20,7 @@ repos:
|
||||
stages: [commit]
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 23.12.1
|
||||
rev: 24.1.1
|
||||
hooks:
|
||||
- id: black
|
||||
stages: [commit]
|
||||
|
@ -1,4 +1,4 @@
|
||||
""" nbesf is Nonebot Bison Enchangable Subscribes File! """
|
||||
"""nbesf is Nonebot Bison Enchangable Subscribes File!"""
|
||||
|
||||
from . import v1, v2
|
||||
from .base import NBESFBase
|
||||
|
@ -1,4 +1,4 @@
|
||||
""" nbesf is Nonebot Bison Enchangable Subscribes File! ver.1"""
|
||||
"""nbesf is Nonebot Bison Enchangable Subscribes File! ver.1"""
|
||||
|
||||
from typing import Any
|
||||
from functools import partial
|
||||
|
@ -1,4 +1,4 @@
|
||||
""" nbesf is Nonebot Bison Enchangable Subscribes File! ver.2"""
|
||||
"""nbesf is Nonebot Bison Enchangable Subscribes File! ver.2"""
|
||||
|
||||
from typing import Any
|
||||
from functools import partial
|
||||
|
@ -1,4 +1,4 @@
|
||||
""" 提供获取 Bot 的方法 """
|
||||
"""提供获取 Bot 的方法"""
|
||||
|
||||
from typing import Any
|
||||
from collections import defaultdict
|
||||
|
@ -106,8 +106,7 @@ async def test_video_forward_without_dynamic(bilibili, bing_dy_list):
|
||||
async def test_article_forward(bilibili, bing_dy_list):
|
||||
post = await bilibili.parse(bing_dy_list[4])
|
||||
assert (
|
||||
post.content
|
||||
== "#明日方舟##饼学大厦#\n9.11专栏更新完毕,"
|
||||
post.content == "#明日方舟##饼学大厦#\n9.11专栏更新完毕,"
|
||||
"这还塌了实属没跟新运营对上\n后边除了周日发饼和PV没提及的中文语音,"
|
||||
"稳了\n别忘了来参加#可露希尔的秘密档案#的主题投票\nhttps://t.bilibili.com/568093580488553786?tab=2"
|
||||
+ "\n--------------\n"
|
||||
@ -125,8 +124,7 @@ async def test_article_forward(bilibili, bing_dy_list):
|
||||
async def test_dynamic_forward(bilibili, bing_dy_list):
|
||||
post = await bilibili.parse(bing_dy_list[5])
|
||||
assert (
|
||||
post.content
|
||||
== "饼组主线饼学预测——9.11版\n①今日结果\n9.11 殿堂上的游禽-星极(x,"
|
||||
post.content == "饼组主线饼学预测——9.11版\n①今日结果\n9.11 殿堂上的游禽-星极(x,"
|
||||
"新运营实锤了)\n②后续预测\n9.12 #罗德岛相簿#+#可露希尔的秘密档案#11话\n9.13"
|
||||
" 六星先锋(执旗手)干员-琴柳\n9.14 宣传策略-空弦+家具\n9.15 轮换池(+中文语音前瞻)\n9.16"
|
||||
" 停机\n9.17 #罗德岛闲逛部#+新六星EP+EP09·风暴瞭望开启\n9.19 #罗德岛相簿#"
|
||||
@ -179,8 +177,7 @@ async def test_fetch_new(bilibili, dummy_user_subinfo):
|
||||
assert len(res2[0][1]) == 1
|
||||
post = res2[0][1][0]
|
||||
assert (
|
||||
post.content
|
||||
== "#罗德厨房——回甘##明日方舟#\r\n明日方舟官方美食漫画,正式开餐。\r\n往事如烟,安然即好。\r\nMenu"
|
||||
post.content == "#罗德厨房——回甘##明日方舟#\r\n明日方舟官方美食漫画,正式开餐。\r\n往事如烟,安然即好。\r\nMenu"
|
||||
" 01:高脚羽兽烤串与罗德岛的领袖\r\n\r\n哔哩哔哩漫画阅读:https://manga.bilibili.com/detail/mc31998?from=manga_search\r\n\r\n关注并转发本动态,"
|
||||
"我们将会在5月27日抽取10位博士赠送【兔兔奇境】周边礼盒一份。 互动抽奖"
|
||||
)
|
||||
|
@ -86,7 +86,9 @@ async def test_display(mock_platform):
|
||||
nickname="Mock",
|
||||
description="Labore amet ut invidunt dolor consectetuer ipsum sadipscing sed minim diam rebum justo tincidunt.",
|
||||
)
|
||||
assert str(post) == rf"""## Post: {id(post):X} ##
|
||||
assert (
|
||||
str(post)
|
||||
== rf"""## Post: {id(post):X} ##
|
||||
|
||||
Rebum delenit iusto augue in rebum sanctus diam stet clita voluptua amet tempor sea in.
|
||||
Vel ullamcorper dolore clita eos amet tempor velit amet in.
|
||||
@ -102,7 +104,8 @@ Vero hendrerit vero diam et lorem blandit ex diam ex...
|
||||
- avatar: b'\x89PNG\r\n...f\x15\xc4\x89'
|
||||
- nickname: 'Mock'
|
||||
- description: 'Labore amet ut invidunt dolor consectetuer ipsum sadipscing sed minim diam rebum justo tincidunt.'
|
||||
""" # noqa: E501
|
||||
"""
|
||||
) # noqa: E501
|
||||
post2 = Post(
|
||||
mock_platform,
|
||||
"Rebum delenit iusto augue in rebum sanctus diam stet clita voluptua amet tempor sea in.\n"
|
||||
@ -123,7 +126,9 @@ Vero hendrerit vero diam et lorem blandit ex diam ex...
|
||||
description="Labore amet ut invidunt dolor consectetuer ipsum sadipscing sed minim diam rebum justo tincidunt.",
|
||||
repost=post,
|
||||
)
|
||||
assert str(post2) == rf"""## Post: {id(post2):X} ##
|
||||
assert (
|
||||
str(post2)
|
||||
== rf"""## Post: {id(post2):X} ##
|
||||
|
||||
Rebum delenit iusto augue in rebum sanctus diam stet clita voluptua amet tempor sea in.
|
||||
Vel ullamcorper dolore clita eos amet tempor velit amet in.
|
||||
@ -158,6 +163,7 @@ Vero hendrerit vero diam et lorem blandit ex diam ex...
|
||||
- nickname: 'Mock'
|
||||
- description: 'Labore amet ut invidunt dolor consectetuer ipsum sadipscing sed minim diam rebum justo tincidunt.'
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
Loading…
x
Reference in New Issue
Block a user