GeekTG / Friendly-Telegram

Best Telegram userbot with inline buttons support
https://ftg.geektg.ml
GNU Affero General Public License v3.0
83 stars 60 forks source link

New web interface, minor and major bug fixes #63

Closed hikariatama 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.63%.

Quality metrics Before After Change
Complexity 32.64 ⛔ 33.53 ⛔ 0.89 👎
Method Length 77.22 🙂 79.14 🙂 1.92 👎
Working memory 10.83 😞 10.92 😞 0.09 👎
Quality 54.13% 🙂 53.50% 🙂 -0.63% 👎
Other metrics Before After Change
Lines 2434 2552 118
Changed files Quality Before Quality After Quality Change
friendly-telegram/dispatcher.py 25.20% 😞 24.60% ⛔ -0.60% 👎
friendly-telegram/loader.py 72.77% 🙂 72.01% 🙂 -0.76% 👎
friendly-telegram/main.py 32.27% 😞 34.95% 😞 2.68% 👍
friendly-telegram/database/backend.py 68.01% 🙂 63.79% 🙂 -4.22% 👎
friendly-telegram/database/frontend.py 86.65% ⭐ 91.88% ⭐ 5.23% 👍
friendly-telegram/modules/corectrl.py 72.77% 🙂 72.89% 🙂 0.12% 👍
friendly-telegram/modules/loader.py 58.11% 🙂 57.63% 🙂 -0.48% 👎
friendly-telegram/web/auth.py 72.99% 🙂 69.81% 🙂 -3.18% 👎
friendly-telegram/web/config.py 68.27% 🙂 63.61% 🙂 -4.66% 👎
friendly-telegram/web/core.py 52.28% 🙂 52.28% 🙂 0.00%
friendly-telegram/web/root.py 85.76% ⭐ 74.67% 🙂 -11.09% 👎
friendly-telegram/web/settings.py 63.78% 🙂 63.78% 🙂 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
friendly-telegram/dispatcher.py CommandDispatcher.handle_command 201 ⛔ 1122.94 ⛔ 23 ⛔ 2.61% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
friendly-telegram/main.py main 119 ⛔ 820.95 ⛔ 22 ⛔ 3.12% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
friendly-telegram/main.py amain 44 ⛔ 595 ⛔ 17 ⛔ 11.05% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
friendly-telegram/modules/loader.py LoaderMod.load_module 43 ⛔ 477.98 ⛔ 14 😞 15.09% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
friendly-telegram/dispatcher.py CommandDispatcher.handle_incoming 34 ⛔ 260.94 ⛔ 13 😞 23.88% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. 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!