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

Fixes #57

Closed penn5 closed 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.51%.

Quality metrics Before After Change
Complexity 6.63 ⭐ 6.81 ⭐ 0.18 👎
Method Length 45.54 ⭐ 45.24 ⭐ -0.30 👍
Working memory 6.40 🙂 6.44 🙂 0.04 👎
Quality 73.70% 🙂 73.19% 🙂 -0.51% 👎
Other metrics Before After Change
Lines 611 579 -32
Changed files Quality Before Quality After Quality Change
hikka/_types.py 77.15% ⭐ 76.28% ⭐ -0.87% 👎
hikka/database.py 71.26% 🙂 71.28% 🙂 0.02% 👍

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
hikka/_types.py ConfigValue.__setattr__ 29 😞 170 😞 8 🙂 41.82% 😞 Refactor to reduce nesting. Try splitting into smaller methods
hikka/_types.py ModuleConfig.__init__ 9 🙂 126 😞 14 😞 50.24% 🙂 Try splitting into smaller methods. Extract out complex expressions
hikka/database.py Database.save 14 🙂 183 😞 6 ⭐ 55.62% 🙂 Try splitting into smaller methods
hikka/database.py Database.postgre_init 4 ⭐ 138 😞 9 🙂 62.31% 🙂 Try splitting into smaller methods
hikka/database.py Database.set 3 ⭐ 101 🙂 11 😞 63.98% 🙂 Extract out complex expressions

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!