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.5.1 #74

Closed hikariatama closed 1 year ago

hikariatama commented 1 year ago
sourcery-ai[bot] commented 1 year ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 14.66 🙂 13.83 🙂 -0.83 👍
Method Length 77.82 🙂 76.94 🙂 -0.88 👍
Working memory 7.73 🙂 7.66 🙂 -0.07 👍
Quality 56.57% 🙂 57.77% 🙂 1.20% 👍
Other metrics Before After Change
Lines 5701 5879 178
Changed files Quality Before Quality After Quality Change
hikka/configurator.py 78.61% ⭐ 79.61% ⭐ 1.00% 👍
hikka/dispatcher.py 32.59% 😞 34.27% 😞 1.68% 👍
hikka/loader.py 44.31% 😞 48.70% 😞 4.39% 👍
hikka/main.py 72.94% 🙂 72.75% 🙂 -0.19% 👎
hikka/types.py 81.20% ⭐ 81.17% ⭐ -0.03% 👎
hikka/utils.py 57.61% 🙂 56.88% 🙂 -0.73% 👎
hikka/validators.py 67.64% 🙂 67.26% 🙂 -0.38% 👎
hikka/version.py 86.81% ⭐ 86.81% ⭐ 0.00%
hikka/modules/test.py 40.40% 😞 41.11% 😞 0.71% 👍
hikka/web/core.py 77.13% ⭐ 76.95% ⭐ -0.18% 👎

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._mod_import_lib 49 ⛔ 808 ⛔ 5.06% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
hikka/loader.py replace_all_refs 67 ⛔ 317 ⛔ 6.20% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
hikka/dispatcher.py CommandDispatcher._handle_command 43 ⛔ 631 ⛔ 26 ⛔ 6.47% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
hikka/dispatcher.py CommandDispatcher._handle_tags 37 ⛔ 453 ⛔ 24 ⛔ 9.55% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
hikka/utils.py answer 59 ⛔ 506 ⛔ 16 ⛔ 9.75% ⛔ 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!