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

Compare (Sourcery refactored) #7

Merged
merged 5 commits into from
Mar 8, 2023
Merged

Compare (Sourcery refactored) #7

merged 5 commits into from
Mar 8, 2023

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Mar 8, 2023

Pull Request #6 refactored by Sourcery.

Since the original Pull Request was opened as a fork in a contributor's
repository, we are unable to create a Pull Request branching from it.

To incorporate these changes, you can either:

  1. Merge this Pull Request instead of the original, or

  2. Ask your contributor to locally incorporate these commits and push them to
    the original Pull Request

    Incorporate changes via command line
    git fetch https://github.com/TeamUltroid/Telethon pull/6/head
    git merge --ff-only FETCH_HEAD
    git push

NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Help us improve this pull request!

Lonami and others added 5 commits February 26, 2023 10:10
On the 10th of February, Telegram sent the following message to
those with an application registered on https://my.telegram.org.

--

Telegram API Update. Hello [REDACTED]. Thank you for contributing to the
open Telegram ecosystem by developing your app, [REDACTED].

Please note that due to recent updates to Telegram's handling of SMS and
the integration of new SMS providers like Firebase, we are changing the
way login codes are handled in third-party apps based on the Telegram API.

Starting on 18.02.2023, users logging into third-party apps will only be
able to receive login codes via Telegram. It will no longer be possible
to request an SMS to log into your app - just like when logging into
Telegram's own desktop and web clients.

Exactly like with the Telegram Desktop and Web apps, if a user doesn't
have a Telegram account yet, they will need to create one first using
an official mobile Telegram app.

We kindly ask you to update your app's login and signup interfaces to
reflect these changes before they go live on 18.02.2023 at 13:00 UTC.

This change will not significantly affect users since, according to our
research, the vast majority of third-party app users also use official
Telegram apps. In the coming months, we expect to offer new tools for
third-party developers that will help streamline the login process.
@sourcery-ai sourcery-ai bot requested a review from New-dev0 March 8, 2023 14:48
@sourcery-ai
Copy link
Author

sourcery-ai bot commented Mar 8, 2023

Sourcery Code Quality Report

Merging this PR leaves code quality unchanged.

Quality metrics Before After Change
Complexity 16.95 🙂 16.95 🙂 0.00
Method Length 96.16 🙂 96.16 🙂 0.00
Working memory 9.92 😞 9.92 😞 0.00
Quality 50.91% 🙂 50.91% 🙂 0.00%
Other metrics Before After Change
Lines 2350 2350 0
Changed files Quality Before Quality After Quality Change
telethon/client/auth.py 44.59% 😞 44.59% 😞 0.00%
telethon/client/downloads.py 49.67% 😞 49.67% 😞 0.00%
telethon/events/chataction.py 63.14% 🙂 63.14% 🙂 0.00%
telethon_examples/interactive_telegram_client.py 49.47% 😞 49.47% 😞 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
telethon_examples/interactive_telegram_client.py InteractiveTelegramClient.run 54 ⛔ 526 ⛔ 17 ⛔ 9.31% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
telethon/events/chataction.py ChatAction.build 31 😞 475 ⛔ 25 ⛔ 11.53% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
telethon/client/auth.py AuthMethods._start 49 ⛔ 367 ⛔ 15 😞 13.70% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
telethon/client/downloads.py DownloadMethods._download_file 24 😞 215 ⛔ 15 😞 28.90% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
telethon/events/chataction.py ChatAction.Event.__init__ 13 🙂 257 ⛔ 16 ⛔ 33.56% 😞 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!

@New-dev0 New-dev0 merged commit 39c6840 into ultroid Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants