hikariatama / Hikka

The most fresh and updateable developer-oriented Telegram userbot
https://hikka.pw
GNU Affero General Public License v3.0
318 stars 516 forks source link

Patch fixing userbot for users with multiaccount #49

Closed hikariatama 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.42%.

Quality metrics Before After Change
Complexity 21.03 😞 20.64 😞 -0.39 👍
Method Length 87.98 🙂 88.85 🙂 0.87 👎
Working memory 6.97 🙂 6.98 🙂 0.01 👎
Quality 52.76% 🙂 53.18% 🙂 0.42% 👍
Other metrics Before After Change
Lines 1100 1110 10
Changed files Quality Before Quality After Quality Change
hikka/loader.py 52.76% 🙂 53.18% 🙂 0.42% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
hikka/loader.py Modules.unload_module 35 ⛔ 297 ⛔ 16 ⛔ 18.25% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
hikka/loader.py Modules.register_commands 29 😞 344 ⛔ 10 😞 28.64% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
hikka/loader.py replace_all_refs 67 ⛔ 298 ⛔ 38.05% 😞 Refactor to reduce nesting. Try splitting into smaller methods
hikka/loader.py Modules._mod_import_lib 35 ⛔ 448 ⛔ 41.43% 😞 Refactor to reduce nesting. Try splitting into smaller methods
hikka/loader.py Modules.complete_registration 17 🙂 214 ⛔ 10 😞 41.74% 😞 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!