nonebot-bison
nonebot-bison copied to clipboard
♻️ 重构订阅平台 Twitter 的代码
- 在 #193 的基础上参考 Review 进行重构
- 复用
SchedulerConfig
中的http_client
- 在
client
中配置 headers 与 cookie,减少无关变量 - 重命名请求函数
got
为raw_request
- 修改了对应的测试用例
Codecov Report
Base: 79.68% // Head: 81.00% // Increases project coverage by +1.32%
:tada:
Coverage data is based on head (
7689eb5
) compared to base (cce34ab
). Patch coverage: 93.63% of modified lines in pull request are covered.
Additional details and impacted files
@@ Coverage Diff @@
## main #197 +/- ##
==========================================
+ Coverage 79.68% 81.00% +1.32%
==========================================
Files 46 47 +1
Lines 2722 2985 +263
==========================================
+ Hits 2169 2418 +249
- Misses 553 567 +14
Flag | Coverage Δ | |
---|---|---|
smoke-test | 81.00% <93.63%> (+1.32%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
src/plugins/nonebot_bison/platform/twitter.py | 93.63% <93.63%> (ø) |
|
src/plugins/nonebot_bison/send.py | 79.36% <0.00%> (-2.12%) |
:arrow_down: |
src/plugins/nonebot_bison/scheduler/scheduler.py | 71.91% <0.00%> (+4.49%) |
:arrow_up: |
...rc/plugins/nonebot_bison/utils/scheduler_config.py | 94.44% <0.00%> (+5.55%) |
:arrow_up: |
src/plugins/nonebot_bison/scheduler/aps.py | 100.00% <0.00%> (+5.55%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.