hikariatama / Hikka

The most fresh and updateable developer-oriented Telegram userbot
https://hikka.pw
GNU Affero General Public License v3.0
315 stars 506 forks source link

V1.6.1 #91

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

Quality metrics Before After Change
Complexity 20.67 😞 20.62 😞 -0.05 👍
Method Length 94.78 🙂 95.13 🙂 0.35 👎
Working memory 7.91 🙂 7.91 🙂 0.00
Quality 53.66% 🙂 53.59% 🙂 -0.07% 👎
Other metrics Before After Change
Lines 20491 20569 78
Changed files Quality Before Quality After Quality Change
hikka/__init__.py 97.50% ⭐ 97.50% ⭐ 0.00%
hikka/__main__.py 21.99% ⛔ 21.99% ⛔ 0.00%
hikka/_internal.py 87.60% ⭐ 83.95% ⭐ -3.65% 👎
hikka/_local_storage.py 74.59% 🙂 74.59% 🙂 0.00%
hikka/configurator.py 79.61% ⭐ 79.61% ⭐ 0.00%
hikka/database.py 75.27% ⭐ 75.27% ⭐ 0.00%
hikka/dispatcher.py 32.04% 😞 32.04% 😞 0.00%
hikka/loader.py 62.58% 🙂 62.58% 🙂 0.00%
hikka/log.py 58.87% 🙂 58.87% 🙂 0.00%
hikka/main.py 71.87% 🙂 71.87% 🙂 0.00%
hikka/pointers.py 93.60% ⭐ 93.60% ⭐ 0.00%
hikka/security.py 40.26% 😞 40.26% 😞 0.00%
hikka/tl_cache.py 51.29% 🙂 51.29% 🙂 0.00%
hikka/translations.py 70.01% 🙂 70.01% 🙂 0.00%
hikka/types.py 66.52% 🙂 66.52% 🙂 0.00%
hikka/utils.py 58.03% 🙂 58.15% 🙂 0.12% 👍
hikka/validators.py 53.94% 🙂 52.37% 🙂 -1.57% 👎
hikka/version.py 86.81% ⭐ 86.81% ⭐ 0.00%
hikka/compat/dragon.py 81.53% ⭐ 81.53% ⭐ 0.00%
hikka/compat/geek.py 82.62% ⭐ 82.62% ⭐ 0.00%
hikka/compat/pyroproxy.py 76.37% ⭐ 76.37% ⭐ 0.00%
hikka/inline/bot_pm.py 81.93% ⭐ 81.93% ⭐ 0.00%
hikka/inline/core.py 50.40% 🙂 50.40% 🙂 0.00%
hikka/inline/events.py 25.51% 😞 25.51% 😞 0.00%
hikka/inline/form.py 5.65% ⛔ 5.65% ⛔ 0.00%
hikka/inline/gallery.py 35.18% 😞 35.18% 😞 0.00%
hikka/inline/list.py 17.66% ⛔ 17.66% ⛔ 0.00%
hikka/inline/query_gallery.py 18.20% ⛔ 18.20% ⛔ 0.00%
hikka/inline/token_obtainment.py 40.57% 😞 40.57% 😞 0.00%
hikka/inline/types.py 88.04% ⭐ 88.04% ⭐ 0.00%
hikka/inline/utils.py 30.38% 😞 30.38% 😞 0.00%
hikka/modules/api_protection.py 66.78% 🙂 66.69% 🙂 -0.09% 👎
hikka/modules/help.py 20.96% ⛔ 20.92% ⛔ -0.04% 👎
hikka/modules/hikka_backup.py 69.47% 🙂 69.38% 🙂 -0.09% 👎
hikka/modules/hikka_config.py 50.78% 🙂 50.73% 🙂 -0.05% 👎
hikka/modules/hikka_info.py 56.95% 🙂 56.78% 🙂 -0.17% 👎
hikka/modules/hikka_security.py 55.32% 🙂 55.24% 🙂 -0.08% 👎
hikka/modules/hikka_settings.py 50.06% 🙂 49.95% 😞 -0.11% 👎
hikka/modules/inline_stuff.py 65.31% 🙂 65.24% 🙂 -0.07% 👎
hikka/modules/loader.py 36.27% 😞 35.14% 😞 -1.13% 👎
hikka/modules/presets.py 77.51% ⭐ 77.51% ⭐ 0.00%
hikka/modules/python.py 61.39% 🙂 61.30% 🙂 -0.09% 👎
hikka/modules/quickstart.py 66.79% 🙂 69.65% 🙂 2.86% 👍
hikka/modules/settings.py 69.17% 🙂 68.93% 🙂 -0.24% 👎
hikka/modules/test.py 46.24% 😞 46.17% 😞 -0.07% 👎
hikka/modules/translations.py 70.21% 🙂 70.00% 🙂 -0.21% 👎
hikka/modules/update_notifier.py 74.09% 🙂 74.09% 🙂 0.00%
hikka/modules/updater.py 60.50% 🙂 60.46% 🙂 -0.04% 👎
hikka/web/core.py 75.99% ⭐ 75.99% ⭐ 0.00%
hikka/web/debugger.py 79.63% ⭐ 79.63% ⭐ 0.00%
hikka/web/proxypass.py 75.59% ⭐ 73.68% 🙂 -1.91% 👎
hikka/web/root.py 58.15% 🙂 58.84% 🙂 0.69% 👍

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 160 ⛔ 2032 ⛔ 0.01% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
hikka/inline/form.py Form.form 91 ⛔ 1113 ⛔ 0.43% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
hikka/inline/gallery.py Gallery.gallery 83 ⛔ 985 ⛔ 0.69% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
hikka/security.py SecurityManager.check 111 ⛔ 759 ⛔ 27 ⛔ 1.53% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
hikka/inline/list.py List.list 60 ⛔ 765 ⛔ 2.71% ⛔ 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!