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

fix errors [#27, #30, #32, #37] #40

Merged
merged 5 commits into from
Aug 12, 2022
Merged

fix errors [#27, #30, #32, #37] #40

merged 5 commits into from
Aug 12, 2022

Conversation

kalanakt
Copy link
Owner

tring to fix error About [#27, #30, #32, #37]

  • Uploader\dl_button.py:44-245
  • custom thumbnail support
  • custom footer caption
  • increase downloading speed
  • pdisk
  • fix file type
  • add thumbnail support
  • document mode support
  • upgrade to pyrogram v2.0.0
  • remove unwanted code snippets
  • upload gdrive link (when deploy locally)

@kalanakt kalanakt self-assigned this Aug 12, 2022
@kalanakt kalanakt added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels Aug 12, 2022
Copy link

@code-review-doctor code-review-doctor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some things to consider. View full project report here.

@@ -0,0 +1,28 @@
# edit this file with your veriable if you'r deploy bot via locally | vps

class Config(object):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class Config(object):
class Config:

Config inherits from object by default, so explicitly inheriting from object is redundant. Removing it keeps the code simpler. Read more.

@sourcery-ai
Copy link

sourcery-ai bot commented Aug 12, 2022

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 1.39%.

Quality metrics Before After Change
Complexity 53.90 ⛔ 49.10 ⛔ -4.80 👍
Method Length 302.79 ⛔ 302.36 ⛔ -0.43 👍
Working memory 19.71 ⛔ 19.28 ⛔ -0.43 👍
Quality 15.49% 16.88% 1.39% 👍
Other metrics Before After Change
Lines 995 965 -30
Changed files Quality Before Quality After Quality Change
bot.py 67.66% 🙂 62.87% 🙂 -4.79% 👎
Uploader/button.py 6.22% ⛔ 7.37% ⛔ 1.15% 👍
Uploader/callbacks.py 62.33% 🙂 62.60% 🙂 0.27% 👍
Uploader/commands.py 89.32% ⭐ 89.32% ⭐ 0.00%
Uploader/config.py 66.30% 🙂 65.73% 🙂 -0.57% 👎
Uploader/dl_button.py 16.67% ⛔ 18.12% ⛔ 1.45% 👍
Uploader/echo.py 5.12% ⛔ 5.72% ⛔ 0.60% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
Uploader/echo.py echo 78 ⛔ 1137 ⛔ 22 ⛔ 3.66% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
Uploader/button.py youtube_dl_call_back 54 ⛔ 957 ⛔ 23 ⛔ 5.13% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
Uploader/dl_button.py ddl_call_back 44 ⛔ 872 ⛔ 20 ⛔ 8.57% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
Uploader/dl_button.py download_coroutine 14 🙂 213 ⛔ 16 ⛔ 35.25% 😞 Try splitting into smaller methods. Extract out complex expressions
Uploader/callbacks.py button 7 ⭐ 140 😞 10 😞 57.11% 🙂 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!

@lgtm-com
Copy link

lgtm-com bot commented Aug 12, 2022

This pull request introduces 9 alerts and fixes 9 when merging d3b34d2 into 51048df - view on LGTM.com

new alerts:

  • 5 for Unused import
  • 2 for Unused local variable
  • 1 for Module is imported more than once
  • 1 for Except block handles 'BaseException'

fixed alerts:

  • 5 for Unused import
  • 3 for Unused local variable
  • 1 for Clear-text logging of sensitive information

fix errors [#27, #30, #32, #37] (Sourcery refactored)
@kalanakt kalanakt merged commit 5f22484 into main Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant