VIP icon indicating copy to clipboard operation
VIP copied to clipboard

Sourcery refactored main branch

Open sourcery-ai[bot] opened this issue 3 years ago β€’ 1 comments

Branch main refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the main branch, then run:

git fetch origin sourcery/main
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

sourcery-ai[bot] avatar Sep 18 '22 16:09 sourcery-ai[bot]

Sourcery Code Quality Report

βœ… Β Merging this PR will increase code quality in the affected files by 0.26%.

Quality metrics Before After Change
Complexity 13.34 πŸ™‚ 12.86 πŸ™‚ -0.48 πŸ‘
Method Length 92.91 πŸ™‚ 92.64 πŸ™‚ -0.27 πŸ‘
Working memory 8.64 πŸ™‚ 8.60 πŸ™‚ -0.04 πŸ‘
Quality 57.47% πŸ™‚ 57.73% πŸ™‚ 0.26% πŸ‘
Other metrics Before After Change
Lines 3743 3677 -66
Changed files Quality Before Quality After Quality Change
Scripts/py/EUserv_extend.py 59.69% πŸ™‚ 61.43% πŸ™‚ 1.74% πŸ‘
Scripts/py/FNplus.py 66.47% πŸ™‚ 66.51% πŸ™‚ 0.04% πŸ‘
Scripts/py/Wechat-Timed-Message.py 44.50% 😞 44.47% 😞 -0.03% πŸ‘Ž
Scripts/py/airport.py 61.67% πŸ™‚ 61.58% πŸ™‚ -0.09% πŸ‘Ž
Scripts/py/deleteDuplicateTasksImplement.py 82.84% ⭐ 83.38% ⭐ 0.54% πŸ‘
Scripts/py/deleteDuplicateTasksNotify.py 53.00% πŸ™‚ 53.55% πŸ™‚ 0.55% πŸ‘
Scripts/py/disable.py 66.60% πŸ™‚ 66.39% πŸ™‚ -0.21% πŸ‘Ž
Scripts/py/getBean.py 56.13% πŸ™‚ 56.20% πŸ™‚ 0.07% πŸ‘
Scripts/py/getcookie.py 62.13% πŸ™‚ 61.03% πŸ™‚ -1.10% πŸ‘Ž
Scripts/py/hostloc2tg_api.py 38.28% 😞 39.63% 😞 1.35% πŸ‘
Scripts/py/jdcar.py 31.18% 😞 30.79% 😞 -0.39% πŸ‘Ž
Scripts/py/mimotion.py 50.07% πŸ™‚ 49.86% 😞 -0.21% πŸ‘Ž
Scripts/py/mimotion2.py 73.07% πŸ™‚ 73.14% πŸ™‚ 0.07% πŸ‘
Scripts/py/netease.py 77.42% ⭐ 77.50% ⭐ 0.08% πŸ‘
Scripts/py/sendNotify.py 53.05% πŸ™‚ 53.61% πŸ™‚ 0.56% πŸ‘
Scripts/py/tg_channel_downloader.py 33.84% 😞 34.29% 😞 0.45% πŸ‘
Scripts/py/win10-PyAuto-deploy.py 68.14% πŸ™‚ 66.73% πŸ™‚ -1.41% πŸ‘Ž

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
Scripts/py/tg_channel_downloader.py handler 81 β›” 523 β›” 14 😞 10.69% β›” Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
Scripts/py/tg_channel_downloader.py all_chat_download 44 β›” 285 β›” 13 😞 19.65% β›” Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
Scripts/py/tg_channel_downloader.py worker 27 😞 346 β›” 15 😞 21.78% β›” Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
Scripts/py/sendNotify.py send 42 β›” 166 😞 10 😞 32.94% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
Scripts/py/deleteDuplicateTasksNotify.py send 42 β›” 163 😞 10 😞 33.23% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • πŸ™‚ good
  • 😞 poor
  • β›” very poor

The πŸ‘ and πŸ‘Ž indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

sourcery-ai[bot] avatar Sep 18 '22 16:09 sourcery-ai[bot]