hikariatama / Hikka

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

V1.5.0 #71

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 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

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!