Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabs2spaces, help when loading module #35

Merged
merged 1 commit into from Nov 6, 2021

Conversation

hikariatama
Copy link
Contributor

Converted tabs to spaces as much as possible. Now when you load module, userbot will show its help:
image
Added emojies to loader.py (when loading failed, loading success etc.)

@gamedich
Copy link

gamedich commented Nov 6, 2021

@innocoffee-ftg !translate

@sourcery-ai
Copy link

sourcery-ai bot commented Nov 6, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 14.26 🙂 14.45 🙂 0.19 👎
Method Length 57.79 ⭐ 58.05 ⭐ 0.26 👎
Working memory 8.84 🙂 8.90 🙂 0.06 👎
Quality 62.05% 🙂 61.77% 🙂 -0.28% 👎
Other metrics Before After Change
Lines 5184 5198 14
Changed files Quality Before Quality After Quality Change
friendly-telegram/main.py 77.40% ⭐ 77.40% ⭐ 0.00%
friendly-telegram/configurator.py 76.95% ⭐ 76.95% ⭐ 0.00%
friendly-telegram/core.py 51.93% 🙂 51.93% 🙂 0.00%
friendly-telegram/decorators.py 27.85% 😞 27.85% 😞 0.00%
friendly-telegram/dispatcher.py 34.48% 😞 34.48% 😞 0.00%
friendly-telegram/fast_uploader.py 72.17% 🙂 72.17% 🙂 0.00%
friendly-telegram/heroku.py 62.30% 🙂 62.30% 🙂 0.00%
friendly-telegram/loader.py 72.74% 🙂 72.74% 🙂 0.00%
friendly-telegram/log.py 83.92% ⭐ 83.92% ⭐ 0.00%
friendly-telegram/main.py 32.15% 😞 32.15% 😞 0.00%
friendly-telegram/usermodule.py 84.56% ⭐ 84.56% ⭐ 0.00%
friendly-telegram/compat/init.py 93.39% ⭐ 93.39% ⭐ 0.00%
friendly-telegram/compat/dbhelper.py 92.68% ⭐ 92.68% ⭐ 0.00%
friendly-telegram/compat/raphielgang.py 57.43% 🙂 57.43% 🙂 0.00%
friendly-telegram/compat/uniborg.py 58.38% 🙂 58.38% 🙂 0.00%
friendly-telegram/compat/util.py 81.12% ⭐ 81.12% ⭐ 0.00%
friendly-telegram/database/backend.py 67.93% 🙂 67.93% 🙂 0.00%
friendly-telegram/database/local_backend.py 92.10% ⭐ 92.10% ⭐ 0.00%
friendly-telegram/modules/corectrl.py 72.45% 🙂 72.45% 🙂 0.00%
friendly-telegram/modules/help.py 29.78% 😞 29.78% 😞 0.00%
friendly-telegram/modules/loader.py 61.78% 🙂 58.69% 🙂 -3.09% 👎
friendly-telegram/modules/log_group.py 55.21% 🙂 55.21% 🙂 0.00%
friendly-telegram/modules/nocollisions.py 77.55% ⭐ 77.55% ⭐ 0.00%
friendly-telegram/modules/python.py 71.75% 🙂 71.75% 🙂 0.00%
friendly-telegram/modules/raphielgang_config.py 91.25% ⭐ 91.25% ⭐ 0.00%
friendly-telegram/modules/test.py 73.79% 🙂 73.79% 🙂 0.00%
friendly-telegram/modules/uniborg_config.py 89.79% ⭐ 89.79% ⭐ 0.00%
friendly-telegram/modules/updater.py 67.14% 🙂 67.14% 🙂 0.00%
friendly-telegram/translations/core.py 40.34% 😞 40.34% 😞 0.00%
friendly-telegram/translations/dynamic.py 88.38% ⭐ 88.38% ⭐ 0.00%
friendly-telegram/web/auth.py 73.17% 🙂 73.17% 🙂 0.00%
friendly-telegram/web/config.py 68.27% 🙂 68.27% 🙂 0.00%
friendly-telegram/web/core.py 52.28% 🙂 52.28% 🙂 0.00%
friendly-telegram/web/initial_setup.py 61.20% 🙂 61.20% 🙂 0.00%
friendly-telegram/web/root.py 85.76% ⭐ 85.76% ⭐ 0.00%
friendly-telegram/web/settings.py 63.78% 🙂 63.78% 🙂 0.00%
friendly-telegram/web/translate.py 86.57% ⭐ 86.57% ⭐ 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/main.py main 116 ⛔ 809 ⛔ 22 ⛔ 3.13% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
friendly-telegram/dispatcher.py CommandDispatcher.handle_command 60 ⛔ 539 ⛔ 16 ⛔ 9.51% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
friendly-telegram/main.py amain 44 ⛔ 591 ⛔ 17 ⛔ 11.05% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
friendly-telegram/decorators.py test 59 ⛔ 268 ⛔ 17 ⛔ 12.99% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
friendly-telegram/modules/loader.py LoaderMod.load_module 37 ⛔ 425 ⛔ 16 ⛔ 14.97% ⛔ 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:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants