mrismanaziz / Man-Userbot

This is UserBot Telegram with many cool modules. Written in Python with Telethon and Py-Tgcalls.
https://t.me/Lunatic0de
Other
221 stars 1.65k forks source link

Man-Userbot v3.1.0 Minor Fixes #134

Closed mrismanaziz closed 2 years ago

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.11%.

Quality metrics Before After Change
Complexity 21.24 😞 21.21 😞 -0.03 👍
Method Length 108.99 🙂 109.13 🙂 0.14 👎
Working memory 13.93 😞 13.88 😞 -0.05 👍
Quality 46.81% 😞 46.92% 😞 0.11% 👍
Other metrics Before After Change
Lines 2641 2644 3
Changed files Quality Before Quality After Quality Change
userbot/clients/client_list.py 65.92% 🙂 67.19% 🙂 1.27% 👍
userbot/clients/logger.py 48.19% 😞 51.29% 🙂 3.10% 👍
userbot/modules/appmisc.py 46.64% 😞 46.64% 😞 0.00%
userbot/modules/chat.py 37.91% 😞 38.01% 😞 0.10% 👍
userbot/modules/clone.py 55.91% 🙂 55.12% 🙂 -0.79% 👎
userbot/modules/fun.py 65.96% 🙂 65.96% 🙂 0.00%
userbot/modules/memify.py 43.68% 😞 43.65% 😞 -0.03% 👎
userbot/modules/offline.py 32.34% 😞 32.09% 😞 -0.25% 👎
userbot/modules/ping.py 69.20% 🙂 69.20% 🙂 0.00%
userbot/modules/rastick.py 61.80% 🙂 61.71% 🙂 -0.09% 👎
userbot/modules/zipfile.py 56.94% 🙂 57.63% 🙂 0.69% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
userbot/modules/chat.py fetch_info 78 ⛔ 877 ⛔ 40 ⛔ 0.80% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
userbot/modules/appmisc.py _ 82 ⛔ 517 ⛔ 21 ⛔ 4.44% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
userbot/modules/offline.py afk_on_pm 42 ⛔ 329 ⛔ 19 ⛔ 12.38% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
userbot/modules/offline.py mention_afk 27 😞 294 ⛔ 16 ⛔ 22.10% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
userbot/modules/memify.py add_text_img 8 ⭐ 207 ⛔ 18 ⛔ 39.19% 😞 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!