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.4.0 #63

Closed hikariatama closed 2 years ago

hikariatama commented 2 years ago
sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.60%.

Quality metrics Before After Change
Complexity 24.48 😞 25.37 😞 0.89 πŸ‘Ž
Method Length 100.91 πŸ™‚ 103.96 πŸ™‚ 3.05 πŸ‘Ž
Working memory 7.46 πŸ™‚ 7.59 πŸ™‚ 0.13 πŸ‘Ž
Quality 48.06% 😞 47.46% 😞 -0.60% πŸ‘Ž
Other metrics Before After Change
Lines 12053 12590 537
Changed files Quality Before Quality After Quality Change
hikka/main.py 64.88% πŸ™‚ 62.73% πŸ™‚ -2.15% πŸ‘Ž
hikka/database.py 71.16% πŸ™‚ 71.10% πŸ™‚ -0.06% πŸ‘Ž
hikka/dispatcher.py 33.38% 😞 32.16% 😞 -1.22% πŸ‘Ž
hikka/forbid_joins.py 46.04% 😞 46.16% 😞 0.12% πŸ‘
hikka/heroku.py 70.03% πŸ™‚ 70.03% πŸ™‚ 0.00%
hikka/loader.py 43.77% 😞 43.25% 😞 -0.52% πŸ‘Ž
hikka/log.py 53.67% πŸ™‚ 53.82% πŸ™‚ 0.15% πŸ‘
hikka/main.py 68.23% πŸ™‚ 68.09% πŸ™‚ -0.14% πŸ‘Ž
hikka/pointers.py 93.36% ⭐ 93.60% ⭐ 0.24% πŸ‘
hikka/security.py 43.95% 😞 40.70% 😞 -3.25% πŸ‘Ž
hikka/tl_cache.py 41.08% 😞 41.08% 😞 0.00%
hikka/types.py 76.41% ⭐ 76.32% ⭐ -0.09% πŸ‘Ž
hikka/utils.py 57.67% πŸ™‚ 57.52% πŸ™‚ -0.15% πŸ‘Ž
hikka/version.py 100.00% ⭐ 100.00% ⭐ 0.00%
hikka/inline/bot_pm.py 81.17% ⭐ 82.64% ⭐ 1.47% πŸ‘
hikka/inline/core.py 47.78% 😞 47.78% 😞 0.00%
hikka/inline/events.py 28.58% 😞 27.50% 😞 -1.08% πŸ‘Ž
hikka/inline/form.py 5.85% β›” 5.74% β›” -0.11% πŸ‘Ž
hikka/inline/gallery.py 35.33% 😞 35.25% 😞 -0.08% πŸ‘Ž
hikka/inline/list.py 18.92% β›” 18.39% β›” -0.53% πŸ‘Ž
hikka/modules/help.py 22.33% β›” 21.19% β›” -1.14% πŸ‘Ž
hikka/modules/hikka_security.py 67.89% πŸ™‚ 54.76% πŸ™‚ -13.13% πŸ‘Ž
hikka/modules/hikka_settings.py 54.93% πŸ™‚ 54.91% πŸ™‚ -0.02% πŸ‘Ž
hikka/modules/inline_stuff.py 60.32% πŸ™‚ 62.96% πŸ™‚ 2.64% πŸ‘
hikka/modules/loader.py 32.21% 😞 32.21% 😞 0.00%
hikka/modules/python.py 51.80% πŸ™‚ 51.80% πŸ™‚ 0.00%
hikka/modules/settings.py 74.88% πŸ™‚ 74.48% πŸ™‚ -0.40% πŸ‘Ž
hikka/modules/test.py 39.91% 😞 39.91% 😞 0.00%
hikka/modules/updater.py 55.27% πŸ™‚ 51.75% πŸ™‚ -3.52% πŸ‘Ž

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 β›” 1916 β›” 0.01% β›” Refactor to reduce nesting. Try splitting into smaller methods
hikka/inline/form.py Form.form 87 β›” 1019 β›” 0.54% β›” Refactor to reduce nesting. Try splitting into smaller methods
hikka/inline/gallery.py Gallery.gallery 78 β›” 882 β›” 0.94% β›” Refactor to reduce nesting. Try splitting into smaller methods
hikka/security.py SecurityManager._check 110 β›” 753 β›” 27 β›” 1.53% β›” Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
hikka/inline/list.py List.list 55 β›” 678 β›” 3.68% β›” 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!