Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Message.__contains__() 未考虑 bool(MessageSegment) 存在 False 情况导致的异常结果 #2572

Merged
merged 6 commits into from
Feb 12, 2024

Conversation

lgc2333
Copy link
Contributor

@lgc2333 lgc2333 commented Feb 11, 2024

No description provided.

RF-Tar-Railt
RF-Tar-Railt previously approved these changes Feb 11, 2024
Copy link

codecov bot commented Feb 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ef77821) 94.00% compared to head (ded7f03) 94.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2572   +/-   ##
=======================================
  Coverage   94.00%   94.00%           
=======================================
  Files          48       48           
  Lines        3906     3906           
=======================================
  Hits         3672     3672           
  Misses        234      234           
Flag Coverage Δ
unittests 94.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Feb 11, 2024

🚀 Deployed on https://deploy-preview-2572--nonebot2.netlify.app

@github-actions github-actions bot temporarily deployed to pull request February 11, 2024 12:52 Inactive
Copy link
Member

标题格式改改

@lgc2333 lgc2333 changed the title fix MessageSegment.__contains__ Fix: MessageSegment.__contains__ Feb 11, 2024
@lgc2333 lgc2333 changed the title Fix: MessageSegment.__contains__ Fix: Message.__contains__ 在目标 MessageSegment.__len__() 返回 0 时返回 False 的 Bug Feb 11, 2024
@lgc2333 lgc2333 changed the title Fix: Message.__contains__ 在目标 MessageSegment.__len__() 返回 0 时返回 False 的 Bug Fix: Message.__contains__() 在目标 MessageSegment.__len__() 返回 0 时返回 False 的 Bug Feb 11, 2024
@mnixry
Copy link
Member

mnixry commented Feb 11, 2024

补充个测试?

@mnixry mnixry added the bug Something isn't working label Feb 11, 2024
@yanyongyu yanyongyu changed the title Fix: Message.__contains__() 在目标 MessageSegment.__len__() 返回 0 时返回 False 的 Bug Fix: Message.__contains__()MessageSegment 为 falsy 时判断错误 Feb 11, 2024
@lgc2333
Copy link
Contributor Author

lgc2333 commented Feb 11, 2024

已补充

@github-actions github-actions bot temporarily deployed to pull request February 11, 2024 13:30 Inactive
@github-actions github-actions bot temporarily deployed to pull request February 11, 2024 13:35 Inactive
@RF-Tar-Railt RF-Tar-Railt changed the title Fix: Message.__contains__()MessageSegment 为 falsy 时判断错误 Fix: Message.__contains__() 未考虑 bool(MessageSegment) 存在 False 情况导致的异常结果 Feb 11, 2024
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
@github-actions github-actions bot temporarily deployed to pull request February 11, 2024 15:57 Inactive
@yanyongyu yanyongyu merged commit 1114225 into nonebot:master Feb 12, 2024
38 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

6 participants