Closed hikariatama closed 1 year ago
✅ Merging this PR will increase code quality in the affected files by 1.83%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 22.29 😞 | 22.01 😞 | -0.28 👍 |
Method Length | 105.48 🙂 | 100.11 🙂 | -5.37 👍 |
Working memory | 8.02 🙂 | 8.03 🙂 | 0.01 👎 |
Quality | 50.24% 🙂 | 52.07% 🙂 | 1.83% 👍 |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 19042 | 19558 | 516 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
hikka/__init__.py | % | 97.50% ⭐ | % |
hikka/__main__.py | 56.45% 🙂 | 21.99% ⛔ | -34.46% 👎 |
hikka/_internal.py | 81.33% ⭐ | 86.24% ⭐ | 4.91% 👍 |
hikka/configurator.py | 79.61% ⭐ | 79.61% ⭐ | 0.00% |
hikka/database.py | 75.08% ⭐ | 75.27% ⭐ | 0.19% 👍 |
hikka/dispatcher.py | 34.27% 😞 | 32.04% 😞 | -2.23% 👎 |
hikka/loader.py | 48.51% 😞 | 62.58% 🙂 | 14.07% 👍 |
hikka/log.py | 55.36% 🙂 | 58.87% 🙂 | 3.51% 👍 |
hikka/main.py | 72.75% 🙂 | 71.87% 🙂 | -0.88% 👎 |
hikka/pointers.py | 93.60% ⭐ | 93.60% ⭐ | 0.00% |
hikka/security.py | 40.50% 😞 | 40.26% 😞 | -0.24% 👎 |
hikka/tl_cache.py | 43.96% 😞 | 51.29% 🙂 | 7.33% 👍 |
hikka/translations.py | 70.01% 🙂 | 70.01% 🙂 | 0.00% |
hikka/types.py | 81.17% ⭐ | 66.52% 🙂 | -14.65% 👎 |
hikka/utils.py | 56.58% 🙂 | 58.67% 🙂 | 2.09% 👍 |
hikka/validators.py | 49.76% 😞 | 53.94% 🙂 | 4.18% 👍 |
hikka/version.py | 86.81% ⭐ | 86.81% ⭐ | 0.00% |
hikka/compat/geek.py | 82.62% ⭐ | 82.62% ⭐ | 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.77% ⛔ | 5.65% ⛔ | -0.12% 👎 |
hikka/inline/gallery.py | 35.28% 😞 | 35.18% 😞 | -0.10% 👎 |
hikka/inline/list.py | 18.35% ⛔ | 17.66% ⛔ | -0.69% 👎 |
hikka/inline/query_gallery.py | 18.20% ⛔ | 18.20% ⛔ | 0.00% |
hikka/inline/token_obtainment.py | 42.09% 😞 | 42.09% 😞 | 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 | 67.89% 🙂 | 67.61% 🙂 | -0.28% 👎 |
hikka/modules/help.py | 21.73% ⛔ | 20.96% ⛔ | -0.77% 👎 |
hikka/modules/hikka_backup.py | 69.30% 🙂 | 69.47% 🙂 | 0.17% 👍 |
hikka/modules/hikka_config.py | 47.38% 😞 | 50.78% 🙂 | 3.40% 👍 |
hikka/modules/hikka_info.py | 63.63% 🙂 | 56.95% 🙂 | -6.68% 👎 |
hikka/modules/hikka_security.py | 55.06% 🙂 | 55.32% 🙂 | 0.26% 👍 |
hikka/modules/hikka_settings.py | 50.67% 🙂 | 50.17% 🙂 | -0.50% 👎 |
hikka/modules/inline_stuff.py | 65.28% 🙂 | 65.31% 🙂 | 0.03% 👍 |
hikka/modules/loader.py | 33.46% 😞 | 37.02% 😞 | 3.56% 👍 |
hikka/modules/presets.py | 77.51% ⭐ | 77.51% ⭐ | 0.00% |
hikka/modules/python.py | 52.16% 🙂 | 61.39% 🙂 | 9.23% 👍 |
hikka/modules/quickstart.py | 68.47% 🙂 | 66.79% 🙂 | -1.68% 👎 |
hikka/modules/settings.py | 73.08% 🙂 | 69.17% 🙂 | -3.91% 👎 |
hikka/modules/test.py | 40.49% 😞 | 46.24% 😞 | 5.75% 👍 |
hikka/modules/translations.py | 60.90% 🙂 | 70.21% 🙂 | 9.31% 👍 |
hikka/modules/update_notifier.py | 73.65% 🙂 | 74.09% 🙂 | 0.44% 👍 |
hikka/modules/updater.py | 57.56% 🙂 | 60.50% 🙂 | 2.94% 👍 |
hikka/web/core.py | 76.95% ⭐ | 75.99% ⭐ | -0.96% 👎 |
hikka/web/root.py | 54.51% 🙂 | 58.15% 🙂 | 3.64% 👍 |
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 | 164 ⛔ | 2099 ⛔ | 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 |
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!
db
attribute ofModules
public.helphide
commandEntityLike
validator.info
,utils.answer
etc to support forums (topics)DragonModule
get_prefix
-userbot
. Pass in"dragon"
to get its prefixModules
-dragon_modules
CustomTelegramClient
-pyro_proxy
. Use pyrogram methods nativelyhelp
commandutils.atexit
methodutils.get_topic
methodutils.answer_file
methodutils.get_cpu_usage
methodutils.get_ram_usage
method.debugpin
command)start
hook toInfiniteLoop
instances withautostart
flag only afterclient_ready
__getattr__
inModule
object with properties for commands and handlerscaller
field to inline units@loader.command
decoratorsend_message
,send_file
in order for old modules to work properlyself.invoke
method for modules