Closed hikariatama closed 2 years ago
❌ Merging this PR will decrease code quality in the affected files by 0.55%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 21.45 😞 | 22.67 😞 | 1.22 👎 |
Method Length | 91.04 🙂 | 91.65 🙂 | 0.61 👎 |
Working memory | 8.74 🙂 | 8.55 🙂 | -0.19 👍 |
Quality | 55.46% 🙂 | 54.91% 🙂 | -0.55% 👎 |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 12363 | 12796 | 433 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
hikka/main.py | 66.83% 🙂 | 66.83% 🙂 | 0.00% |
hikka/database.py | 73.47% 🙂 | 73.17% 🙂 | -0.30% 👎 |
hikka/dispatcher.py | 42.71% 😞 | 42.71% 😞 | 0.00% |
hikka/entity_cache.py | 64.01% 🙂 | 64.01% 🙂 | 0.00% |
hikka/forbid_joins.py | 60.40% 🙂 | 60.40% 🙂 | 0.00% |
hikka/loader.py | 54.89% 🙂 | 52.76% 🙂 | -2.13% 👎 |
hikka/log.py | 68.47% 🙂 | 62.19% 🙂 | -6.28% 👎 |
hikka/main.py | 70.35% 🙂 | 70.35% 🙂 | 0.00% |
hikka/security.py | 44.93% 😞 | 44.61% 😞 | -0.32% 👎 |
hikka/validators.py | 70.55% 🙂 | 72.34% 🙂 | 1.79% 👍 |
hikka/version.py | 100.00% ⭐ | 100.00% ⭐ | 0.00% |
hikka/compat/geek.py | 80.74% ⭐ | 80.74% ⭐ | 0.00% |
hikka/inline/events.py | 28.31% 😞 | 27.08% 😞 | -1.23% 👎 |
hikka/inline/form.py | 32.32% 😞 | 32.30% 😞 | -0.02% 👎 |
hikka/inline/gallery.py | 49.81% 😞 | 49.81% 😞 | 0.00% |
hikka/inline/list.py | 43.03% 😞 | 43.03% 😞 | 0.00% |
hikka/inline/types.py | 90.59% ⭐ | 88.15% ⭐ | -2.44% 👎 |
hikka/inline/utils.py | 29.43% 😞 | 29.58% 😞 | 0.15% 👍 |
hikka/modules/api_protection.py | 78.21% ⭐ | 77.81% ⭐ | -0.40% 👎 |
hikka/modules/help.py | 25.00% ⛔ | 23.37% ⛔ | -1.63% 👎 |
hikka/modules/heroku_waker.py | 81.62% ⭐ | 82.24% ⭐ | 0.62% 👍 |
hikka/modules/hikka_backup.py | 68.15% 🙂 | 69.83% 🙂 | 1.68% 👍 |
hikka/modules/hikka_config.py | 51.37% 🙂 | 49.41% 😞 | -1.96% 👎 |
hikka/modules/hikka_info.py | 69.28% 🙂 | 65.02% 🙂 | -4.26% 👎 |
hikka/modules/hikka_security.py | 70.41% 🙂 | 70.00% 🙂 | -0.41% 👎 |
hikka/modules/hikka_settings.py | 56.15% 🙂 | 55.62% 🙂 | -0.53% 👎 |
hikka/modules/inline_stuff.py | 65.45% 🙂 | 63.42% 🙂 | -2.03% 👎 |
hikka/modules/loader.py | 49.76% 😞 | 49.40% 😞 | -0.36% 👎 |
hikka/modules/okteto_waker.py | 60.92% 🙂 | 61.68% 🙂 | 0.76% 👍 |
hikka/modules/python.py | 65.97% 🙂 | 60.32% 🙂 | -5.65% 👎 |
hikka/modules/quickstart.py | 69.89% 🙂 | 76.36% ⭐ | 6.47% 👍 |
hikka/modules/settings.py | 78.13% ⭐ | 77.40% ⭐ | -0.73% 👎 |
hikka/modules/test.py | 40.81% 😞 | 40.99% 😞 | 0.18% 👍 |
hikka/modules/update_notifier.py | 74.15% 🙂 | 75.04% ⭐ | 0.89% 👍 |
hikka/modules/updater.py | 56.31% 🙂 | 56.86% 🙂 | 0.55% 👍 |
hikka/web/core.py | 76.85% ⭐ | 76.85% ⭐ | 0.00% |
hikka/web/root.py | 55.20% 🙂 | 55.20% 🙂 | 0.00% |
Here are some functions in these files that still need a tune-up:
File | Function | Complexity | Length | Working Memory | Quality | Recommendation |
---|---|---|---|---|---|---|
hikka/security.py | SecurityManager._check | 71 ⛔ | 501 ⛔ | 27 ⛔ | 2.82% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
hikka/inline/utils.py | Utils._edit_unit | 68 ⛔ | 625 ⛔ | 22 ⛔ | 4.29% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
hikka/modules/help.py | HelpMod.helpcmd | 63 ⛔ | 532 ⛔ | 22 ⛔ | 4.89% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
hikka/dispatcher.py | CommandDispatcher._handle_command | 37 ⛔ | 513 ⛔ | 25 ⛔ | 8.88% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
hikka/inline/events.py | Events._callback_query_handler | 54 ⛔ | 434 ⛔ | 15 😞 | 11.98% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
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!
version
(must be defined BEFOREinit
method)self.lookup
to libsself.allmodules
to libsself._lib_get
to libsself._lib_set
to libsself.get_prefix
to libsself.tg_id
to libsclient.tg_id
to every TelegramClienton_lib_update
(invoked when library is being updated by new version)black --preview
Hikka
if user specified it somewhere below.config <lib>
.e
error format