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.12 #50

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 increase code quality in the affected files by 0.27%.

Quality metrics Before After Change
Complexity 38.61 ⛔ 39.74 ⛔ 1.13 👎
Method Length 119.29 🙂 119.65 🙂 0.36 👎
Working memory 7.45 🙂 7.45 🙂 0.00
Quality 48.34% 😞 48.61% 😞 0.27% 👍
Other metrics Before After Change
Lines 4124 4356 232
Changed files Quality Before Quality After Quality Change
hikka/forbid_joins.py 60.40% 🙂 63.87% 🙂 3.47% 👍
hikka/loader.py 53.18% 🙂 53.18% 🙂 0.00%
hikka/version.py 100.00% ⭐ 100.00% ⭐ 0.00%
hikka/inline/bot_pm.py 82.50% ⭐ 82.50% ⭐ 0.00%
hikka/inline/form.py 32.30% 😞 32.49% 😞 0.19% 👍
hikka/inline/utils.py 29.58% 😞 29.75% 😞 0.17% 👍
hikka/modules/hikka_settings.py 55.62% 🙂 57.00% 🙂 1.38% 👍
hikka/modules/loader.py 49.40% 😞 48.93% 😞 -0.47% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
hikka/inline/utils.py Utils._edit_unit 68 ⛔ 625 ⛔ 22 ⛔ 4.29% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
hikka/inline/utils.py Utils._generate_markup 85 ⛔ 402 ⛔ 12 😞 14.47% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
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/inline/form.py Form._form_inline_handler 21 😞 443 ⛔ 20 ⛔ 19.72% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
hikka/modules/hikka_settings.py HikkaSettingsMod.watchercmd 22 😞 311 ⛔ 14 😞 26.97% 😞 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!