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.1 #59

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

Quality metrics Before After Change
Complexity 23.18 😞 23.04 😞 -0.14 👍
Method Length 107.90 🙂 102.75 🙂 -5.15 👍
Working memory 7.93 🙂 7.65 🙂 -0.28 👍
Quality 49.48% 😞 49.62% 😞 0.14% 👍
Other metrics Before After Change
Lines 12929 13977 1048
Changed files Quality Before Quality After Quality Change
hikka/main.py 64.72% 🙂 64.93% 🙂 0.21% 👍
hikka/_types.py 76.42% ⭐ % %
hikka/database.py 71.46% 🙂 71.28% 🙂 -0.18% 👎
hikka/dispatcher.py 33.95% 😞 33.54% 😞 -0.41% 👎
hikka/heroku.py 68.78% 🙂 70.14% 🙂 1.36% 👍
hikka/loader.py 43.11% 😞 43.13% 😞 0.02% 👍
hikka/log.py 55.62% 🙂 53.76% 🙂 -1.86% 👎
hikka/main.py 68.56% 🙂 68.36% 🙂 -0.20% 👎
hikka/pointers.py 93.52% ⭐
hikka/tl_cache.py 41.22% 😞
hikka/types.py 74.36% 🙂
hikka/utils.py 58.47% 🙂 57.77% 🙂 -0.70% 👎
hikka/version.py 100.00% ⭐ 100.00% ⭐ 0.00%
hikka/inline/form.py 5.90% ⛔ 5.85% ⛔ -0.05% 👎
hikka/inline/gallery.py 35.39% 😞 35.39% 😞 0.00%
hikka/inline/list.py 19.05% ⛔ 18.98% ⛔ -0.07% 👎
hikka/inline/utils.py 29.81% 😞 30.31% 😞 0.50% 👍
hikka/modules/api_protection.py 67.40% 🙂 67.05% 🙂 -0.35% 👎
hikka/modules/help.py 22.53% ⛔ 22.35% ⛔ -0.18% 👎
hikka/modules/heroku_waker.py 81.79% ⭐ 81.85% ⭐ 0.06% 👍
hikka/modules/hikka_backup.py 68.48% 🙂 68.24% 🙂 -0.24% 👎
hikka/modules/hikka_config.py 48.65% 😞 47.73% 😞 -0.92% 👎
hikka/modules/hikka_info.py 63.20% 🙂 66.16% 🙂 2.96% 👍
hikka/modules/hikka_security.py 69.06% 🙂 68.01% 🙂 -1.05% 👎
hikka/modules/hikka_settings.py 55.60% 🙂 55.02% 🙂 -0.58% 👎
hikka/modules/inline_stuff.py 60.71% 🙂 60.43% 🙂 -0.28% 👎
hikka/modules/loader.py 33.00% 😞 32.77% 😞 -0.23% 👎
hikka/modules/okteto_waker.py 59.95% 🙂 60.42% 🙂 0.47% 👍
hikka/modules/python.py 52.08% 🙂 51.86% 🙂 -0.22% 👎
hikka/modules/quickstart.py 75.27% ⭐ 76.39% ⭐ 1.12% 👍
hikka/modules/settings.py 75.95% ⭐ 75.02% ⭐ -0.93% 👎
hikka/modules/test.py 39.54% 😞 39.97% 😞 0.43% 👍
hikka/modules/update_notifier.py 73.96% 🙂 73.86% 🙂 -0.10% 👎
hikka/modules/updater.py 55.54% 🙂 55.36% 🙂 -0.18% 👎
hikka/web/core.py 76.87% ⭐ 76.87% ⭐ 0.00%
hikka/web/root.py 54.11% 🙂 54.07% 🙂 -0.04% 👎

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 ⛔ 1851 ⛔ 0.01% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
hikka/inline/form.py Form.form 84 ⛔ 1001 ⛔ 0.65% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
hikka/inline/gallery.py Gallery.gallery 75 ⛔ 864 ⛔ 1.12% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
hikka/inline/utils.py Utils._edit_unit 78 ⛔ 770 ⛔ 22 ⛔ 3.69% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
hikka/inline/list.py List.list 52 ⛔ 660 ⛔ 4.38% ⛔ Refactor to reduce nesting. Try splitting into smaller methods

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!