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

v1.2.10 #45

Closed hikariatama closed 2 years ago

hikariatama commented 2 years ago
sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 21.42 😞 23.37 😞 1.95 👎
Method Length 80.92 🙂 84.07 🙂 3.15 👎
Working memory 8.62 🙂 8.41 🙂 -0.21 👍
Quality 56.89% 🙂 56.19% 🙂 -0.70% 👎
Other metrics Before After Change
Lines 5558 5854 296
Changed files Quality Before Quality After Quality Change
hikka/_types.py 72.94% 🙂 76.73% ⭐ 3.79% 👍
hikka/forbid_joins.py 61.49% 🙂 60.84% 🙂 -0.65% 👎
hikka/loader.py 57.33% 🙂 55.21% 🙂 -2.12% 👎
hikka/main.py 70.62% 🙂 70.60% 🙂 -0.02% 👎
hikka/utils.py 59.91% 🙂 59.51% 🙂 -0.40% 👎
hikka/version.py 100.00% ⭐ 100.00% ⭐ 0.00%
hikka/modules/help.py 25.10% 😞 25.11% 😞 0.01% 👍
hikka/modules/hikka_config.py 53.95% 🙂 51.70% 🙂 -2.25% 👎
hikka/modules/hikka_settings.py 56.33% 🙂 56.38% 🙂 0.05% 👍
hikka/modules/loader.py 50.26% 🙂 49.92% 😞 -0.34% 👎
hikka/modules/python.py 66.83% 🙂 66.21% 🙂 -0.62% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
hikka/modules/help.py HelpMod.helpcmd 63 ⛔ 526 ⛔ 22 ⛔ 4.91% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
hikka/utils.py answer 54 ⛔ 395 ⛔ 14 😞 13.69% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
hikka/loader.py Modules.unload_module 32 😞 285 ⛔ 16 ⛔ 19.93% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
hikka/utils.py smart_split 22 😞 340 ⛔ 15 😞 24.95% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
hikka/modules/hikka_settings.py HikkaSettingsMod.watchercmd 22 😞 309 ⛔ 14 😞 27.03% 😞 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:

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!