Closed hikariatama closed 1 year ago
β Merging this PR will increase code quality in the affected files by 0.02%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 22.16 π | 22.33 π | 0.17 π |
Method Length | 100.35 π | 100.62 π | 0.27 π |
Working memory | 8.17 π | 8.11 π | -0.06 π |
Quality | 50.65% π | 50.67% π | 0.02% π |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 17304 | 17704 | 400 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
hikka/main.py | 62.73% π | 57.97% π | -4.76% π |
hikka/configurator.py | 74.12% π | 78.61% β | 4.49% π |
hikka/database.py | 71.01% π | 75.08% β | 4.07% π |
hikka/dispatcher.py | 32.16% π | 32.59% π | 0.43% π |
hikka/loader.py | 43.25% π | 44.31% π | 1.06% π |
hikka/log.py | 53.78% π | 55.36% π | 1.58% π |
hikka/main.py | 68.37% π | 72.94% π | 4.57% π |
hikka/pointers.py | 93.60% β | 93.60% β | 0.00% |
hikka/security.py | 40.51% π | 40.50% π | -0.01% π |
hikka/tl_cache.py | 41.13% π | 43.96% π | 2.83% π |
hikka/translations.py | 69.42% π | 70.01% π | 0.59% π |
hikka/types.py | 81.29% β | 81.20% β | -0.09% π |
hikka/utils.py | 56.71% π | 57.61% π | 0.90% π |
hikka/validators.py | 69.77% π | 67.76% π | -2.01% π |
hikka/version.py | 86.81% β | 86.81% β | 0.00% |
hikka/compat/geek.py | 82.62% β | 82.62% β | 0.00% |
hikka/inline/bot_pm.py | 82.64% β | 81.93% β | -0.71% π |
hikka/inline/core.py | 47.77% π | 50.40% π | 2.63% π |
hikka/inline/events.py | 27.50% π | 26.17% π | -1.33% π |
hikka/inline/form.py | 5.74% β | 5.78% β | 0.04% π |
hikka/inline/gallery.py | 35.26% π | 35.09% π | -0.17% π |
hikka/inline/list.py | 18.39% β | 18.38% β | -0.01% π |
hikka/inline/query_gallery.py | 18.50% β | 18.20% β | -0.30% π |
hikka/inline/token_obtainment.py | 42.26% π | 42.09% π | -0.17% π |
hikka/inline/types.py | 87.81% β | 88.04% β | 0.23% π |
hikka/inline/utils.py | 30.28% π | 30.32% π | 0.04% π |
hikka/modules/api_protection.py | 66.90% π | 68.35% π | 1.45% π |
hikka/modules/help.py | 21.19% β | 22.41% β | 1.22% π |
hikka/modules/hikka_backup.py | 68.12% π | 70.03% π | 1.91% π |
hikka/modules/hikka_config.py | 47.69% π | 47.78% π | 0.09% π |
hikka/modules/hikka_info.py | 65.32% π | 65.49% π | 0.17% π |
hikka/modules/hikka_security.py | 54.68% π | 55.72% π | 1.04% π |
hikka/modules/hikka_settings.py | 54.91% π | 51.75% π | -3.16% π |
hikka/modules/inline_stuff.py | 62.90% π | 65.76% π | 2.86% π |
hikka/modules/loader.py | 32.23% π | 33.70% π | 1.47% π |
hikka/modules/okteto_waker.py | 60.31% π | 60.39% π | 0.08% π |
hikka/modules/presets.py | 78.79% β | 77.51% β | -1.28% π |
hikka/modules/python.py | 51.80% π | 53.06% π | 1.26% π |
hikka/modules/quickstart.py | 75.49% β | 76.70% β | 1.21% π |
hikka/modules/settings.py | 74.27% π | 74.27% π | 0.00% |
hikka/modules/test.py | 39.91% π | 40.40% π | 0.49% π |
hikka/modules/update_notifier.py | 73.50% π | 74.00% π | 0.50% π |
hikka/modules/updater.py | 51.71% π | 57.86% π | 6.15% π |
hikka/web/core.py | 76.72% β | 77.13% β | 0.41% π |
hikka/web/root.py | 54.00% π | 54.51% π | 0.51% π |
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 | 148 β | 1924 β | 0.01% β | Refactor to reduce nesting. Try splitting into smaller methods | |
hikka/inline/form.py | Form.form | 86 β | 1043 β | 0.57% β | Refactor to reduce nesting. Try splitting into smaller methods | |
hikka/inline/gallery.py | Gallery.gallery | 78 β | 915 β | 0.93% β | Refactor to reduce nesting. Try splitting into smaller methods | |
hikka/security.py | SecurityManager.check | 110 β | 743 β | 27 β | 1.54% β | Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions |
hikka/inline/list.py | List.list | 55 β | 699 β | 3.66% β | 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!
on_change
param processing in confighikka.types.CoreOverwriteError
APIRatelimiter
CoreOverwriteError
handlingTelegramID
validator to work with values between 2^32 and 2^64 - 1@loader.tag(thumb_url="")
decorator.invoke
)inspect_cache
)inspect_modules
clear_cache
,clear_entity_cache
,clear_fulluser_cache
,clear_fullchannel_cache
,clear_perms_cache
reload_core
to automatically reload core modules from diskflags
anddescription
toRegExp
validatormin_len
andmax_len
toString
validatorEmoji
validatorEntityLike
validatorhikka.validators.MultiChoice
utils.get_args_html
to get arguments of command with HTML.config APIRatelimiter
.info
using command.setinfo
. In order to use it, remove buttons using config--hosting
,--no-nickname
,--token
,--web-only
,--docker-deps-internal
APIRatelimiter
->APILimiter
joinChannel
andimportChatInvite
calls-by-external-modules blockage for all users by defaultuser@hikka:~$
+ legacy migration