Closed hikariatama closed 2 years ago
❌ Merging this PR will decrease code quality in the affected files by 0.49%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 23.56 😞 | 24.20 😞 | 0.64 👎 |
Method Length | 100.80 🙂 | 101.14 🙂 | 0.34 👎 |
Working memory | 7.98 🙂 | 7.85 🙂 | -0.13 👍 |
Quality | 49.46% 😞 | 48.97% 😞 | -0.49% 👎 |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 7502 | 7785 | 283 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
hikka/_types.py | 75.35% ⭐ | 76.42% ⭐ | 1.07% 👍 |
hikka/dispatcher.py | 34.18% 😞 | 33.95% 😞 | -0.23% 👎 |
hikka/entity_cache.py | 45.20% 😞 | 44.87% 😞 | -0.33% 👎 |
hikka/forbid_joins.py | 42.67% 😞 | 46.27% 😞 | 3.60% 👍 |
hikka/loader.py | 44.86% 😞 | 43.12% 😞 | -1.74% 👎 |
hikka/main.py | 68.62% 🙂 | 68.56% 🙂 | -0.06% 👎 |
hikka/utils.py | 58.29% 🙂 | 58.47% 🙂 | 0.18% 👍 |
hikka/version.py | 100.00% ⭐ | 100.00% ⭐ | 0.00% |
hikka/inline/core.py | 48.18% 😞 | 47.85% 😞 | -0.33% 👎 |
hikka/modules/help.py | 23.46% ⛔ | 22.53% ⛔ | -0.93% 👎 |
hikka/modules/hikka_config.py | 48.70% 😞 | 48.65% 😞 | -0.05% 👎 |
hikka/modules/hikka_info.py | 63.93% 🙂 | 63.20% 🙂 | -0.73% 👎 |
hikka/modules/hikka_security.py | 69.13% 🙂 | 69.06% 🙂 | -0.07% 👎 |
hikka/modules/loader.py | 32.17% 😞 | 33.00% 😞 | 0.83% 👍 |
hikka/modules/python.py | 58.86% 🙂 | 52.08% 🙂 | -6.78% 👎 |
hikka/modules/quickstart.py | 75.96% ⭐ | 75.27% ⭐ | -0.69% 👎 |
hikka/modules/settings.py | 75.72% ⭐ | 75.95% ⭐ | 0.23% 👍 |
hikka/modules/test.py | 39.43% 😞 | 39.54% 😞 | 0.11% 👍 |
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/loader.py | Modules._mod_import_lib | 49 ⛔ | 792 ⛔ | 5.06% ⛔ | Refactor to reduce nesting. Try splitting into smaller methods | |
hikka/modules/help.py | HelpMod.helpcmd | 63 ⛔ | 609 ⛔ | 21 ⛔ | 5.20% ⛔ | 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_command | 43 ⛔ | 632 ⛔ | 26 ⛔ | 6.47% ⛔ | 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!
...
is being replaced with..
(unnecessary prefix escape)@loader.tag
no_commands
,only_commands
,out
,in
,only_messages
,editable
,no_media
,only_media
,only_photos
,only_videos
,only_audios
,only_docs
,only_stickers
,only_inline
,only_channels
,only_groups
,only_pm
. See docs for detailed infoutils.mime_type
to get mime_type of file in messagemessage.message
,message.text
andmessage.raw_text
.info
.help
, add version to single mod help message.e
when returning tl class instead of object.e
.security
and.inlinesec
only to owner by default# requires
metatag in libraries# scope: hikka_min
metatag in libraries.settings
self.inline
to libraries@loader.command
,@loader.watcher
,@loader.inline_handler
,@loader.callback_handler
@loader.command(ru_doc="Привет")
)aiogram.types.Message
inutils.get_chat_id
print
withlogging.info
in main script to make url visible in logs