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.3.2 #61

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.83%.

Quality metrics Before After Change
Complexity 36.70 ⛔ 36.60 ⛔ -0.10 👍
Method Length 106.22 🙂 104.87 🙂 -1.35 👍
Working memory 6.87 🙂 6.84 🙂 -0.03 👍
Quality 41.41% 😞 42.24% 😞 0.83% 👍
Other metrics Before After Change
Lines 3322 3378 56
Changed files Quality Before Quality After Quality Change
hikka/dispatcher.py 33.54% 😞 33.45% 😞 -0.09% 👎
hikka/loader.py 43.13% 😞 43.86% 😞 0.73% 👍
hikka/types.py 74.36% 🙂 76.55% ⭐ 2.19% 👍
hikka/version.py 100.00% ⭐ 100.00% ⭐ 0.00%
hikka/modules/loader.py 32.77% 😞 32.28% 😞 -0.49% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
hikka/modules/loader.py LoaderMod.load_module 153 ⛔ 1908 ⛔ 0.01% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
hikka/loader.py Modules._mod_import_lib 49 ⛔ 798 ⛔ 5.06% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
hikka/dispatcher.py CommandDispatcher._handle_command 43 ⛔ 634 ⛔ 27 ⛔ 6.23% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
hikka/loader.py replace_all_refs 67 ⛔ 316 ⛔ 6.24% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
hikka/dispatcher.py CommandDispatcher._handle_tags 37 ⛔ 461 ⛔ 26 ⛔ 8.90% ⛔ 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!