kalanakt / All-Url-Uploader

A simple telegram Bot, Upload Media File| video To telegram using the direct download link. (youtube, Mediafire, google drive, mega drive, etc)
https://urluploader.vercel.app
MIT License
383 stars 950 forks source link

Sourcery refactored main branch #26

Closed sourcery-ai[bot] closed 2 years ago

sourcery-ai[bot] commented 2 years ago

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] commented 2 years ago

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.03%.

Quality metrics Before After Change
Complexity 43.66 ⛔ 43.77 ⛔ 0.11 👎
Method Length 277.78 ⛔ 278.33 ⛔ 0.55 👎
Working memory 18.87 ⛔ 18.87 ⛔ 0.00
Quality 17.03% 17.00% -0.03% 👎
Other metrics Before After Change
Lines 603 603 0
Changed files Quality Before Quality After Quality Change
Uploader/button.py 6.66% ⛔ 6.66% ⛔ 0.00%
Uploader/config.py 65.65% 🙂 65.81% 🙂 0.16% 👍
Uploader/dl_button.py 17.22% ⛔ 17.07% ⛔ -0.15% 👎
Uploader/functions/ran_text.py 94.92% ⭐ 96.67% ⭐ 1.75% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
Uploader/button.py youtube_dl_call_back 60 ⛔ 971 ⛔ 22 ⛔ 4.82% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
Uploader/dl_button.py ddl_call_back 47 ⛔ 889 ⛔ 20 ⛔ 7.88% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
Uploader/dl_button.py download_coroutine 14 🙂 213 ⛔ 16 ⛔ 35.25% 😞 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

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!

lgtm-com[bot] commented 2 years ago

This pull request fixes 1 alert when merging e6ca4df3dc06aa2a7f45ee856334167daa951638 into dc3422d8362b982818ec27ca5c27448003b61658 - view on LGTM.com

fixed alerts: