Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Conversation

@sourcery-ai
Copy link
Contributor

@sourcery-ai sourcery-ai bot commented Jan 13, 2022

Pull Request #61 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/supabase-community/gotrue-py pull/61/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!

zodman and others added 2 commits January 12, 2022 21:09
because the intention is good but instead receives an annoying print.
@sourcery-ai
Copy link
Contributor Author

sourcery-ai bot commented Jan 13, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 5.11 ⭐ 4.74 ⭐ -0.37 👍
Method Length 44.13 ⭐ 43.71 ⭐ -0.42 👍
Working memory 7.65 🙂 7.78 🙂 0.13 👎
Quality 74.53% 🙂 74.60% 🙂 0.07% 👍
Other metrics Before After Change
Lines 599 598 -1
Changed files Quality Before Quality After Quality Change
gotrue/_sync/client.py 74.53% 🙂 74.60% 🙂 0.07% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
gotrue/_sync/client.py SyncGoTrueClient.get_session_from_url 15 🙂 217 ⛔ 14 😞 36.53% 😞 Try splitting into smaller methods. Extract out complex expressions
gotrue/_sync/client.py SyncGoTrueClient.__init__ 3 ⭐ 88 🙂 16 ⛔ 58.70% 🙂 Extract out complex expressions
gotrue/_sync/client.py SyncGoTrueClient.sign_in 9 🙂 104 🙂 10 😞 59.67% 🙂 Extract out complex expressions
gotrue/_sync/client.py SyncGoTrueClient._recover_and_refresh 8 ⭐ 70 🙂 10 😞 65.51% 🙂 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!

@dreinon
Copy link
Contributor

dreinon commented Jan 13, 2022

@leynier I would just merge the original PR and make a specific PR for soucery refactors.

@leynier
Copy link
Contributor

leynier commented Jan 13, 2022

@leynier I would just merge the original PR and make a specific PR for soucery refactors.

Ok

@dreinon dreinon closed this Jan 13, 2022
@leynier leynier deleted the sourcery/pull-61 branch January 14, 2022 02:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants